mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-10 12:35:06 +08:00
BUG: Buffer dtype mismatch, expected 'Py_ssize_t' but got 'long'
This commit is contained in:
@@ -271,8 +271,8 @@ def _local_binary_pattern(double[:, ::1] image,
|
|||||||
# Values represent offsets of neighbour rectangles relative to central one.
|
# Values represent offsets of neighbour rectangles relative to central one.
|
||||||
# It has order starting from top left and going clockwise.
|
# It has order starting from top left and going clockwise.
|
||||||
cdef:
|
cdef:
|
||||||
Py_ssize_t[::1] mlbp_r_offsets = np.asarray([-1, -1, -1, 0, 1, 1, 1, 0])
|
Py_ssize_t[::1] mlbp_r_offsets = np.asarray([-1, -1, -1, 0, 1, 1, 1, 0], dtype=np.intp)
|
||||||
Py_ssize_t[::1] mlbp_c_offsets = np.asarray([-1, 0, 1, 1, 1, 0, -1, -1])
|
Py_ssize_t[::1] mlbp_c_offsets = np.asarray([-1, 0, 1, 1, 1, 0, -1, -1], dtype=np.intp)
|
||||||
|
|
||||||
|
|
||||||
def _multiblock_lbp(float[:, ::1] int_image,
|
def _multiblock_lbp(float[:, ::1] int_image,
|
||||||
|
|||||||
Reference in New Issue
Block a user