diff --git a/skimage/morphology/_watershed.pyx b/skimage/morphology/_watershed.pyx index beaf874b..a0857707 100644 --- a/skimage/morphology/_watershed.pyx +++ b/skimage/morphology/_watershed.pyx @@ -23,12 +23,12 @@ include "heap_watershed.pxi" @cython.boundscheck(False) -def watershed(DTYPE_INT32_t[:] image, +def watershed(DTYPE_INT32_t[::1] image, DTYPE_INT32_t[:, ::1] pq, Py_ssize_t age, DTYPE_INT32_t[:, ::1] structure, - DTYPE_BOOL_t[:] mask, - DTYPE_INT32_t[:] output): + DTYPE_BOOL_t[::1] mask, + DTYPE_INT32_t[::1] output): """Do heavy lifting of watershed algorithm Parameters diff --git a/skimage/morphology/watershed.py b/skimage/morphology/watershed.py index c9fb1789..2bdb57b2 100644 --- a/skimage/morphology/watershed.py +++ b/skimage/morphology/watershed.py @@ -202,7 +202,7 @@ def watershed(image, markers, connectivity=None, offset=None, mask=None): stride = np.dot(image_stride, np.array(offs)) offs.insert(0, stride) c.append(offs) - c = np.array(c, np.int32) + c = np.array(c, dtype=np.int32) pq, age = __heapify_markers(c_markers, c_image) pq = np.ascontiguousarray(pq, dtype=np.int32)