numpy 1.6 compat fix

This commit is contained in:
Matěj Týč
2014-10-27 23:33:59 +01:00
parent 152a6d0de8
commit 416f3a2eb5
+1 -1
View File
@@ -323,7 +323,7 @@ def label(input, DTYPE_t neighbors=8, background=None, return_num=False):
# Having data a 2D array slows down access considerably using linear
# indices even when using the data_p pointer :-(
data = np.copy(input.flatten().astype(DTYPE), order="C")
data = np.copy(input.flatten().astype(DTYPE))
forest = np.arange(data.size, dtype=DTYPE)
cdef DTYPE_t *forest_p = <DTYPE_t*>forest.data