diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2019-01-09 10:42:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-09 10:42:07 +0100 |
commit | ad0e902717d1245d17856d47d7f16bc7817da866 (patch) | |
tree | 227dd1e687cb1018b78fc4ce7c7f7c83dafcfe82 /numpy/lib/utils.py | |
parent | a4f1faadcef7a9866005d2017663c400c160d800 (diff) | |
parent | 217f13b955df24ba3314802071dd04b1262e1320 (diff) | |
download | numpy-ad0e902717d1245d17856d47d7f16bc7817da866.tar.gz |
Merge pull request #12679 from mattip/remove-warnings
ENH: remove "Invalid value" warnings from median, percentile
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 5a4cae235..6b112f37a 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -1140,17 +1140,12 @@ def _median_nancheck(data, result, axis, out): n = n.filled(False) if result.ndim == 0: if n == True: - warnings.warn("Invalid value encountered in median", - RuntimeWarning, stacklevel=3) if out is not None: out[...] = data.dtype.type(np.nan) result = out else: result = data.dtype.type(np.nan) elif np.count_nonzero(n.ravel()) > 0: - warnings.warn("Invalid value encountered in median for" + - " %d results" % np.count_nonzero(n.ravel()), - RuntimeWarning, stacklevel=3) result[n] = np.nan return result |