MAINT: statically type img in toplevel _compute_thin_image

This commit is contained in:
Evgeni Burovski
2016-02-20 17:26:12 +00:00
parent 2f0d0cc18c
commit c60b6b05cf
+4 -2
View File
@@ -646,7 +646,9 @@ cdef list _loop_through(pixel_type[:, :, ::1] img,
return simple_border_points
def _compute_thin_image(img):
@cython.boundscheck(False)
@cython.wraparound(False)
def _compute_thin_image(pixel_type[:, :, ::1] img not None):
cdef:
int unchanged_borders = 0, curr_border
@@ -680,4 +682,4 @@ def _compute_thin_image(img):
unchanged_borders += 1
simple_border_points = []
return img
return np.asarray(img)