diff --git a/skimage/segmentation/_slic.pyx b/skimage/segmentation/_slic.pyx index 030bcb4e..4a57ee93 100644 --- a/skimage/segmentation/_slic.pyx +++ b/skimage/segmentation/_slic.pyx @@ -46,8 +46,8 @@ def _slic_cython(double[:, :, :, ::1] image_zyx, cdef Py_ssize_t[:, :, ::1] nearest_clusters \ = np.empty((depth, height, width), dtype=np.intp) - cdef float[:, :, ::1] distance \ - = np.empty((depth, height, width), dtype=np.float32) + cdef double[:, :, ::1] distance \ + = np.empty((depth, height, width), dtype=np.double) cdef Py_ssize_t i, c, k, x, y, z, x_min, x_max, y_min, y_max, z_min, \ z_max