diff --git a/skimage/feature/_texture.pyx b/skimage/feature/_texture.pyx index d454a812..d716e690 100644 --- a/skimage/feature/_texture.pyx +++ b/skimage/feature/_texture.pyx @@ -4,10 +4,14 @@ #cython: wraparound=False import numpy as np cimport numpy as cnp -from libc.math cimport sin, cos, abs, NAN +from libc.math cimport sin, cos, abs from .._shared.interpolation cimport bilinear_interpolation, round +cdef extern from "numpy/npy_math.h": + double NAN "NPY_NAN" + + def _glcm_loop(cnp.uint8_t[:, ::1] image, double[:] distances, double[:] angles, Py_ssize_t levels, cnp.uint32_t[:, :, :, ::1] out):