Use np.intp rather than ssize_t for ndarrays

This commit is contained in:
Johannes Schönberger
2013-01-22 22:36:58 +01:00
parent 2957cb873b
commit 2c90aa70e5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ def line(ssize_t y, ssize_t x, ssize_t y2, ssize_t x2):
"""
cdef np.ndarray[ssize_t, ndim=1, mode="c"] rr, cc
cdef np.ndarray[np.intp_t, ndim=1, mode="c"] rr, cc
cdef char steep = 0
cdef ssize_t dx = abs(x2 - x)
+1 -1
View File
@@ -26,7 +26,7 @@ def possible_hull(np.ndarray[dtype=np.uint8_t, ndim=2, mode="c"] img):
# cols storage slots for top boundary pixels
# rows storage slots for right boundary pixels
# cols storage slots for bottom boundary pixels
cdef np.ndarray[dtype=ssize_t, ndim=2] nonzero = \
cdef np.ndarray[dtype=np.intp_t, ndim=2] nonzero = \
np.ones((2 * (rows + cols), 2), dtype=np.int)
nonzero *= -1