mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-07 00:52:52 +08:00
Merge pull request #417 from stefanv/msvc_build_fix
PKG: MSVC build fixes by Christoph Gohlke.
This commit is contained in:
@@ -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 * log2(p)
|
||||
e -= p * log(p) / 0.6931471805599453
|
||||
|
||||
return <dtype_t>e * 1000
|
||||
else:
|
||||
|
||||
@@ -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 * log2(p)
|
||||
e -= p * log(p) / 0.6931471805599453
|
||||
|
||||
return <dtype_t>e * 10
|
||||
else:
|
||||
|
||||
+10
-10
@@ -29,31 +29,31 @@ def configuration(parent_package='', top_path=None):
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension('_denoise_cy', sources=['_denoise_cy.c'],
|
||||
include_dirs=[get_numpy_include_dirs(), '../_shared'])
|
||||
config.add_extension('rank/_core8', sources=['rank/_core8.c'],
|
||||
config.add_extension('rank._core8', sources=['rank/_core8.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension('rank/_core16', sources=['rank/_core16.c'],
|
||||
config.add_extension('rank._core16', sources=['rank/_core16.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension('rank/_crank8', sources=['rank/_crank8.c'],
|
||||
config.add_extension('rank._crank8', sources=['rank/_crank8.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension(
|
||||
'rank/_crank8_percentiles', sources=['rank/_crank8_percentiles.c'],
|
||||
'rank._crank8_percentiles', sources=['rank/_crank8_percentiles.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension('rank/_crank16', sources=['rank/_crank16.c'],
|
||||
config.add_extension('rank._crank16', sources=['rank/_crank16.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension(
|
||||
'rank/_crank16_percentiles', sources=['rank/_crank16_percentiles.c'],
|
||||
'rank._crank16_percentiles', sources=['rank/_crank16_percentiles.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension(
|
||||
'rank/_crank16_bilateral', sources=['rank/_crank16_bilateral.c'],
|
||||
'rank._crank16_bilateral', sources=['rank/_crank16_bilateral.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension(
|
||||
'rank/rank', sources=['rank/rank.c'],
|
||||
'rank.rank', sources=['rank/rank.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension(
|
||||
'rank/percentile_rank', sources=['rank/percentile_rank.c'],
|
||||
'rank.percentile_rank', sources=['rank/percentile_rank.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension(
|
||||
'rank/bilateral_rank', sources=['rank/bilateral_rank.c'],
|
||||
'rank.bilateral_rank', sources=['rank/bilateral_rank.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user