From 0b7fe8a68047ba20e220d9849fdac1c60bb1c419 Mon Sep 17 00:00:00 2001 From: Erik Quaeghebeur Date: Mon, 23 Oct 2017 10:42:47 +0200 Subject: Make warnings for nanmin and nanmax consistent --- numpy/lib/nanfunctions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/nanfunctions.py') diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py index ffedcd68a..b3f3bfc69 100644 --- a/numpy/lib/nanfunctions.py +++ b/numpy/lib/nanfunctions.py @@ -279,7 +279,7 @@ def nanmin(a, axis=None, out=None, keepdims=np._NoValue): # which do not implement isnan (gh-9009), or fmin correctly (gh-8975) res = np.fmin.reduce(a, axis=axis, out=out, **kwargs) if np.isnan(res).any(): - warnings.warn("All-NaN axis encountered", RuntimeWarning, stacklevel=2) + warnings.warn("All-NaN slice encountered", RuntimeWarning, stacklevel=2) else: # Slow, but safe for subclasses of ndarray a, mask = _replace_nan(a, +np.inf) -- cgit v1.2.1