Do not ignore exceptions in core functions

This commit is contained in:
Johannes Schönberger
2012-11-10 11:20:56 +01:00
parent c00fedde6c
commit 8c55640d60
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -14,4 +14,4 @@ cdef void _core16(np.uint16_t kernel(Py_ssize_t *, Py_ssize_t, np.uint16_t,
np.ndarray[np.uint8_t, ndim=2] mask,
np.ndarray[np.uint16_t, ndim=2] out,
char shift_x, char shift_y, Py_ssize_t bitdepth,
float p0, float p1, Py_ssize_t s0, Py_ssize_t s1)
float p0, float p1, Py_ssize_t s0, Py_ssize_t s1) except *
+2 -2
View File
@@ -37,7 +37,7 @@ cdef void _core16(np.uint16_t kernel(Py_ssize_t *, Py_ssize_t, np.uint16_t,
np.ndarray[np.uint8_t, ndim=2] mask,
np.ndarray[np.uint16_t, ndim=2] out,
char shift_x, char shift_y, Py_ssize_t bitdepth,
float p0, float p1, Py_ssize_t s0, Py_ssize_t s1):
float p0, float p1, Py_ssize_t s0, Py_ssize_t s1) except *:
"""Compute histogram for each pixel neighborhood, apply kernel function and
use kernel function return value for output image.
"""
@@ -60,7 +60,7 @@ cdef void _core16(np.uint16_t kernel(Py_ssize_t *, Py_ssize_t, np.uint16_t,
maxbin_list = [0, 0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]
midbin_list = [0, 0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
#set maxbin and midbin
# set maxbin and midbin
cdef Py_ssize_t maxbin = maxbin_list[bitdepth]
cdef Py_ssize_t midbin = midbin_list[bitdepth]
+1 -1
View File
@@ -19,4 +19,4 @@ cdef void _core8(np.uint8_t kernel(Py_ssize_t *, Py_ssize_t, np.uint8_t, float,
np.ndarray[np.uint8_t, ndim=2] mask,
np.ndarray[np.uint8_t, ndim=2] out,
char shift_x, char shift_y, float p0, float p1,
Py_ssize_t s0, Py_ssize_t s1)
Py_ssize_t s0, Py_ssize_t s1) except *
+1 -1
View File
@@ -48,7 +48,7 @@ cdef void _core8(np.uint8_t kernel(Py_ssize_t *, Py_ssize_t, np.uint8_t, float,
np.ndarray[np.uint8_t, ndim=2] mask,
np.ndarray[np.uint8_t, ndim=2] out,
char shift_x, char shift_y, float p0, float p1,
Py_ssize_t s0, Py_ssize_t s1):
Py_ssize_t s0, Py_ssize_t s1) except *:
"""Compute histogram for each pixel neighborhood, apply kernel function and
use kernel function return value for output image.
"""