Fix bugs in usage of typed memoryviews

This commit is contained in:
Johannes Schönberger
2013-08-19 19:31:40 +02:00
parent c8f619e384
commit 5f82c206b4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ cimport numpy as cnp
def _skeletonize_loop(cnp.uint8_t[:, ::1] result,
cnp.uint8_t[:] i, cnp.uint8_t[:] j,
Py_ssize_t[:] i, Py_ssize_t[:] j,
cnp.int32_t[:] order, cnp.uint8_t[:] table):
"""
Inner loop of skeletonize function
@@ -207,4 +207,4 @@ def _table_lookup_index(cnp.uint8_t[:, ::1] image):
indexer[i - 1, j_shape - 1] += 128
indexer[i, j_shape - 1] += 16
indexer[i + 1, j_shape - 1] += 2
return indexer
return np.asarray(indexer)
+1 -1
View File
@@ -123,4 +123,4 @@ def _warp_fast(cnp.ndarray image, cnp.ndarray H, output_shape=None,
out[tfr, tfc] = interp_func(&img[0, 0], rows, cols, r, c,
mode_c, cval)
return out
return np.asarray(out)