summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorendolith <endolith@gmail.com>2013-05-17 00:03:24 -0400
committerendolith <endolith@gmail.com>2013-05-17 00:03:24 -0400
commitf40e9d53548a5033d1fd2c68c8257dddea14e9f1 (patch)
tree721e918c2976f4c368d3060729292a357371385f /numpy/lib/function_base.py
parentbb6eb76de99447dd413d330181ca6fda188fcb04 (diff)
downloadnumpy-f40e9d53548a5033d1fd2c68c8257dddea14e9f1.tar.gz
DOC: Harmonize max and min docstrings with each other
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 9f3b2a0f8..d782f454a 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -1478,20 +1478,23 @@ def nansum(a, axis=None):
def nanmin(a, axis=None):
"""
- Return the minimum of an array or minimum along an axis ignoring any NaNs.
+ Return the minimum of an array or minimum along an axis, ignoring any NaNs.
Parameters
----------
a : array_like
- Array containing numbers whose minimum is desired.
+ Array containing numbers whose minimum is desired. If `a` is not
+ an array, a conversion is attempted.
axis : int, optional
- Axis along which the minimum is computed.The default is to compute
+ Axis along which the minimum is computed. The default is to compute
the minimum of the flattened array.
Returns
-------
nanmin : ndarray
- A new array or a scalar array with the result.
+ An array with the same shape as `a`, with the specified axis removed.
+ If `a` is a 0-d array, or if axis is None, an ndarray scalar is
+ returned. The same dtype as `a` is returned.
See Also
--------
@@ -1519,7 +1522,6 @@ def nanmin(a, axis=None):
If the input has a integer type the function is equivalent to np.min.
-
Examples
--------
>>> a = np.array([[1, 2], [3, np.nan]])
@@ -1581,7 +1583,7 @@ def nanargmin(a, axis=None):
def nanmax(a, axis=None):
"""
- Return the maximum of an array or maximum along an axis ignoring any NaNs.
+ Return the maximum of an array or maximum along an axis, ignoring any NaNs.
Parameters
----------
@@ -1596,8 +1598,8 @@ def nanmax(a, axis=None):
-------
nanmax : ndarray
An array with the same shape as `a`, with the specified axis removed.
- If `a` is a 0-d array, or if axis is None, a ndarray scalar is
- returned. The the same dtype as `a` is returned.
+ If `a` is a 0-d array, or if axis is None, an ndarray scalar is
+ returned. The same dtype as `a` is returned.
See Also
--------