mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 13:47:37 +08:00
Fix ValueError: Buffer dtype mismatch, expected 'Py_ssize_t' but got 'long' on win-amd64
This commit is contained in:
@@ -217,9 +217,9 @@ def _enforce_label_connectivity_cython(Py_ssize_t[:, :, ::1] segments,
|
||||
width = segments.shape[2]
|
||||
|
||||
# neighborhood arrays
|
||||
cdef Py_ssize_t[::1] ddx = np.array((1, -1, 0, 0, 0, 0))
|
||||
cdef Py_ssize_t[::1] ddy = np.array((0, 0, 1, -1, 0, 0))
|
||||
cdef Py_ssize_t[::1] ddz = np.array((0, 0, 0, 0, 1, -1))
|
||||
cdef Py_ssize_t[::1] ddx = np.array((1, -1, 0, 0, 0, 0), dtype=np.intp)
|
||||
cdef Py_ssize_t[::1] ddy = np.array((0, 0, 1, -1, 0, 0), dtype=np.intp)
|
||||
cdef Py_ssize_t[::1] ddz = np.array((0, 0, 0, 0, 1, -1), dtype=np.intp)
|
||||
|
||||
# new object with connected segments initialized to -1
|
||||
cdef Py_ssize_t[:, :, ::1] connected_segments \
|
||||
|
||||
Reference in New Issue
Block a user