Skip to content

Commit 2661dc9

Browse files
committed
Merge pull request #43 from OpenPIV/alexlib-patch-1
fixed the bug of nonzero returning int64 on 64bit
2 parents aa2b71f + f8851b6 commit 2661dc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openpiv/src/lib.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def replace_nans( np.ndarray[DTYPEf_t, ndim=2] array, int max_iter, float tol, i
5858
cdef np.ndarray[DTYPEi_t, ndim=1] jnans = np.empty([array.shape[0]*array.shape[1]], dtype=DTYPEi)
5959

6060
# indices where array is NaN
61-
inans, jnans = np.nonzero( np.isnan(array) )
61+
inans, jnans = [x.astype(DTYPEi) for x in np.nonzero( np.isnan(array) )]
6262

6363
# number of NaN elements
6464
n_nans = len(inans)

0 commit comments

Comments
 (0)