Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
BUG: incorrect argument order to _copyto in in np.nanmax, np.nanmin
  • Loading branch information
mhvk committed Apr 20, 2014
1 parent 61c699e commit 5348c02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numpy/lib/nanfunctions.py
Expand Up @@ -228,7 +228,7 @@ def nanmin(a, axis=None, out=None, keepdims=False):
# Check for all-NaN axis
mask = np.all(mask, axis=axis, keepdims=keepdims)
if np.any(mask):
res = _copyto(res, mask, np.nan)
res = _copyto(res, np.nan, mask)
warnings.warn("All-NaN axis encountered", RuntimeWarning)
return res

Expand Down Expand Up @@ -327,7 +327,7 @@ def nanmax(a, axis=None, out=None, keepdims=False):
# Check for all-NaN axis
mask = np.all(mask, axis=axis, keepdims=keepdims)
if np.any(mask):
res = _copyto(res, mask, np.nan)
res = _copyto(res, np.nan, mask)
warnings.warn("All-NaN axis encountered", RuntimeWarning)
return res

Expand Down

0 comments on commit 5348c02

Please sign in to comment.