diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2019-11-04 17:32:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-04 17:32:10 -0700 |
commit | 4393e0c0cb1772d0f9691117d238d000b209decd (patch) | |
tree | 5dda9c9a885af59ecdcd4c3c947e69bd6bab48bf /numpy/lib/nanfunctions.py | |
parent | 7b8513fff4c3673d8a967a1d72a73feab2072e8f (diff) | |
parent | 9aa8c4756d7282dd49a7093ce7a6725258106b9a (diff) | |
download | numpy-4393e0c0cb1772d0f9691117d238d000b209decd.tar.gz |
Merge pull request #14800 from mattip/reorder-obj-comparison-loop
ENH: change object-array comparisons to prefer OO->O unfuncs
Diffstat (limited to 'numpy/lib/nanfunctions.py')
-rw-r--r-- | numpy/lib/nanfunctions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py index 18ccab3b8..457cca146 100644 --- a/numpy/lib/nanfunctions.py +++ b/numpy/lib/nanfunctions.py @@ -99,7 +99,7 @@ def _replace_nan(a, val): if a.dtype == np.object_: # object arrays do not support `isnan` (gh-9009), so make a guess - mask = a != a + mask = np.not_equal(a, a, dtype=bool) elif issubclass(a.dtype.type, np.inexact): mask = np.isnan(a) else: |