diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-10-16 11:17:01 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-10-16 11:17:01 -0700 |
commit | 95a5219774818eb754053a8c45023e2e185642e7 (patch) | |
tree | 9340729579d1b3c181df5b27fb316670c31394ec /numpy/core/numeric.py | |
parent | 16236e27f93b3a1b3bf6a58750fdaec68b224420 (diff) | |
parent | 83fb19e7f37502df72d4c4865138f7d84de7c517 (diff) | |
download | numpy-95a5219774818eb754053a8c45023e2e185642e7.tar.gz |
Merge pull request #3914 from mhvk/numeric/isclose-mask-safe
BUG Masked arrays treated incorrectly in isclose(..,..,equal_nan=True)
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 1aa59ce58..53254ec6a 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -2216,7 +2216,8 @@ def isclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False): cond[~finite] = (x[~finite] == y[~finite]) if equal_nan: # Make NaN == NaN - cond[isnan(x) & isnan(y)] = True + both_nan = isnan(x) & isnan(y) + cond[both_nan] = both_nan[both_nan] return cond def array_equal(a1, a2): |