diff options
author | mattip <matti.picus@gmail.com> | 2019-10-30 10:54:51 +0200 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-10-30 10:54:51 +0200 |
commit | 5c778954cc801fd2272fa6aeb89b85868aa25899 (patch) | |
tree | 04424c7de5ce68c0e480924418511eb1c36861a1 /numpy/lib/nanfunctions.py | |
parent | 647ea1908cc33eb2f9fb6c5828cfb895f8663cc0 (diff) | |
download | numpy-5c778954cc801fd2272fa6aeb89b85868aa25899.tar.gz |
ENH: add OO->? loops, use np.compare(a, b, dtype=bool), add comments
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 0ae74bbbb..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).astype(bool) + mask = np.not_equal(a, a, dtype=bool) elif issubclass(a.dtype.type, np.inexact): mask = np.isnan(a) else: |