From 7941d764949ca67d90ecd435b475a2d87f20b3c3 Mon Sep 17 00:00:00 2001 From: Alex Liberzon Date: Fri, 26 Aug 2016 16:17:53 +0300 Subject: [PATCH] _isnan is replaced by np.isnan --- openpiv/src/lib.pyx | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openpiv/src/lib.pyx b/openpiv/src/lib.pyx index 8b28bf0a..969d7206 100644 --- a/openpiv/src/lib.pyx +++ b/openpiv/src/lib.pyx @@ -3,13 +3,13 @@ import numpy as np cimport numpy as np cimport cython -from libc.math cimport isnan DTYPEf = np.float ctypedef np.float_t DTYPEf_t DTYPEi = np.int ctypedef np.int_t DTYPEi_t + @cython.boundscheck(False) # turn of bounds-checking for entire function @cython.wraparound(False) # turn of bounds-checking for entire function 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 if j+J-kernel_size < array.shape[1] and j+J-kernel_size >= 0: # if the neighbour element is not NaN itself. - if not isnan(array[i+I-kernel_size, j+J-kernel_size]): + if not np.isnan(array[i+I-kernel_size, j+J-kernel_size]): # do not bother with 0 kernel values if kernel[I, J] != 0: diff --git a/setup.py b/setup.py index 94aad5d4..609b9383 100644 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ setup( name = "OpenPIV", - version = "0.20.2", + version = "0.20.3", author = "OpenPIV contributors", author_email = "openpiv2008@gmail.com", description = "An open source software for PIV data analysis",