Skip to content

Commit

Permalink
Merge pull request #2947 from oleksandr-pavlyk/cython-warnings
Browse files Browse the repository at this point in the history
Fix Cython compilation warnings in NL Means and Watershed

The watershed code is sped up by 5-15% in some cases.
  • Loading branch information
jni committed Mar 8, 2018
2 parents 2c0f0b2 + 9d39748 commit b862868
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions skimage/morphology/_watershed.pyx
Expand Up @@ -126,6 +126,7 @@ def watershed_raveled(cnp.float64_t[::1] image,
cdef Py_ssize_t i = 0
cdef Py_ssize_t age = 1
cdef Py_ssize_t index = 0
cdef Py_ssize_t neighbor_index = 0
cdef DTYPE_BOOL_t compact = (compactness > 0)

cdef Heap *hp = <Heap *> heap_from_numpy2()
Expand Down
2 changes: 1 addition & 1 deletion skimage/restoration/_nl_means_denoising.pyx
Expand Up @@ -12,7 +12,7 @@ ctypedef np.float64_t IMGDTYPE
cdef double DISTANCE_CUTOFF = 5.0

cdef extern from "fast_exp.h":
inline double fast_exp(double y) nogil
double fast_exp(double y) nogil


cdef inline double patch_distance_2d(IMGDTYPE [:, :] p1,
Expand Down

0 comments on commit b862868

Please sign in to comment.