|
Line 0
Link Here
|
|
|
1 |
--- skimage/measure/_ccomp.pyx.orig 2017-03-28 23:49:21.000000000 -0700 |
| 2 |
+++ skimage/measure/_ccomp.pyx 2017-08-29 18:16:28.114552000 -0700 |
| 3 |
@@ -3,17 +3,18 @@ |
| 4 |
#cython: nonecheck=False |
| 5 |
#cython: wraparound=False |
| 6 |
|
| 7 |
-import numpy as np |
| 8 |
from .._shared.utils import warn |
| 9 |
|
| 10 |
-cimport numpy as cnp |
| 11 |
+import numpy as np |
| 12 |
+cimport numpy as np |
| 13 |
|
| 14 |
|
| 15 |
DTYPE = np.intp |
| 16 |
+#ctypedef np.intp_t DTYPE_t |
| 17 |
BG_NODE_NULL = -999 |
| 18 |
|
| 19 |
# Short int - could be more graceful to the CPU cache |
| 20 |
-ctypedef cnp.int32_t INTS_t |
| 21 |
+ctypedef np.int32_t INTS_t |
| 22 |
|
| 23 |
cdef struct s_shpinfo |
| 24 |
|
| 25 |
@@ -350,8 +351,8 @@ def label_cython(input, neighbors=None, background=Non |
| 26 |
# algorithm the input if it is the case |
| 27 |
input_corrected, swaps = reshape_array(input) |
| 28 |
|
| 29 |
- cdef cnp.ndarray[DTYPE_t, ndim=1] data |
| 30 |
- cdef cnp.ndarray[DTYPE_t, ndim=1] forest |
| 31 |
+ cdef np.ndarray[DTYPE_t, ndim=1] data |
| 32 |
+ cdef np.ndarray[DTYPE_t, ndim=1] forest |
| 33 |
|
| 34 |
# Having data a 2D array slows down access considerably using linear |
| 35 |
# indices even when using the data_p pointer :-( |