Skip to content

Commit f0e2393

Browse files
authored
Merge pull request #65 from alexlib/npy_isnan
_isnan is replaced by np.isnan
2 parents 20b8b57 + 7941d76 commit f0e2393

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

openpiv/src/lib.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import numpy as np
44
cimport numpy as np
55
cimport cython
6-
from libc.math cimport isnan
76

87
DTYPEf = np.float
98
ctypedef np.float_t DTYPEf_t
109
DTYPEi = np.int
1110
ctypedef np.int_t DTYPEi_t
1211

12+
1313
@cython.boundscheck(False) # turn of bounds-checking for entire function
1414
@cython.wraparound(False) # turn of bounds-checking for entire function
1515
def replace_nans(np.ndarray[DTYPEf_t, ndim=2] array, int max_iter, float tol, int kernel_size=2, str method='disk'):
@@ -141,7 +141,7 @@ def replace_nans(np.ndarray[DTYPEf_t, ndim=2] array, int max_iter, float tol, in
141141
if j+J-kernel_size < array.shape[1] and j+J-kernel_size >= 0:
142142

143143
# if the neighbour element is not NaN itself.
144-
if not isnan(array[i+I-kernel_size, j+J-kernel_size]):
144+
if not np.isnan(array[i+I-kernel_size, j+J-kernel_size]):
145145

146146
# do not bother with 0 kernel values
147147
if kernel[I, J] != 0:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969

7070
setup( name = "OpenPIV",
71-
version = "0.20.2",
71+
version = "0.20.3",
7272
author = "OpenPIV contributors",
7373
author_email = "[email protected]",
7474
description = "An open source software for PIV data analysis",

0 commit comments

Comments
 (0)