Merge remote-tracking branch 'cgohlke/patch-2' into msvc_build_fix

Conflicts:
	skimage/filter/rank/_crank16.pyx
	skimage/filter/rank/_crank8.pyx
This commit is contained in:
Stefan van der Walt
2013-02-25 09:20:05 +02:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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 <dtype_t>e * 1000
else:
+2 -2
View File
@@ -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 <dtype_t>e * 10
else: