diff options
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 0023c99f0..ed66a1ccf 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -1520,6 +1520,17 @@ def amax(a, axis=None, out=None): >>> np.amax(a, axis=1) array([1, 3]) + Note + ---- + NaN values are propagated, that is if at least one item is nan, the + corresponding max value will be nan as well. To ignore NaN values (matlab + behavior), please use nanmax. + + See Also + -------- + nanmax: nan values are ignored instead of being propagated + fmax: same behavior as the C99 fmax function + """ try: amax = a.max @@ -1561,6 +1572,16 @@ def amin(a, axis=None, out=None): >>> np.amin(a, axis=1) # Minima along the second axis array([0, 2]) + Note + ---- + NaN values are propagated, that is if at least one item is nan, the + corresponding min value will be nan as well. To ignore NaN values (matlab + behavior), please use nanmin. + + See Also + -------- + nanmin: nan values are ignored instead of being propagated + fmin: same behavior as the C99 fmin function """ try: amin = a.min |