diff --git a/skimage/filter/rank/_crank16.pyx b/skimage/filter/rank/_crank16.pyx index 667c179d..232d6812 100644 --- a/skimage/filter/rank/_crank16.pyx +++ b/skimage/filter/rank/_crank16.pyx @@ -4,7 +4,7 @@ #cython: wraparound=False cimport numpy as cnp -from libc.math cimport log2 +from libc.math cimport log from skimage.filter.rank._core16 cimport _core16 @@ -276,7 +276,7 @@ cdef inline dtype_t kernel_entropy(Py_ssize_t * histo, float pop, for i in range(maxbin): p = histo[i] / pop if p > 0: - e -= p * log(p) / 0.30102999566398119521373889472449 + e -= p * log(p) / 0.6931471805599453 return e * 1000 else: diff --git a/skimage/filter/rank/_crank8.pyx b/skimage/filter/rank/_crank8.pyx index 3e06f319..cb7febac 100644 --- a/skimage/filter/rank/_crank8.pyx +++ b/skimage/filter/rank/_crank8.pyx @@ -4,7 +4,7 @@ #cython: wraparound=False cimport numpy as cnp -from libc.math cimport log2 +from libc.math cimport log from skimage.filter.rank._core8 cimport _core8 @@ -281,7 +281,7 @@ cdef inline dtype_t kernel_entropy(Py_ssize_t * histo, float pop, for i in range(256): p = histo[i] / pop if p > 0: - e -= p * log(p) / 0.30102999566398119521373889472449 + e -= p * log(p) / 0.6931471805599453 return e * 10 else: