diff options
author | Cimarron Mittelsteadt <cimarronm@gmail.com> | 2014-10-16 20:22:39 -0700 |
---|---|---|
committer | Cimarron Mittelsteadt <cimarronm@gmail.com> | 2014-10-16 20:22:39 -0700 |
commit | 39aaa43b732c68878e6207caab3cbeee5e83bf7c (patch) | |
tree | 9bfa876f0b5251e7c0d46e80d8ef9ebcaba4592f /numpy/core/fromnumeric.py | |
parent | aaa8940913902001a4961d793e7238eafc193861 (diff) | |
download | numpy-39aaa43b732c68878e6207caab3cbeee5e83bf7c.tar.gz |
DOC: Update axis documentation for tuple of ints to be consistent between functions
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 01325728c..674cd5f59 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -2095,9 +2095,14 @@ def amax(a, axis=None, out=None, keepdims=False): ---------- a : array_like Input data. - axis : int or tuple of ints, optional + axis : None or int or tuple of ints, optional Axis or axes along which to operate. By default, flattened input is used. + + .. versionadded: 1.7.0 + + If this is a tuple of ints, the maximum is selected over multiple axes, + instead of a single axis or all the axes as before. out : ndarray, optional Alternative output array in which to place the result. Must be of the same shape and buffer length as the expected output. @@ -2180,9 +2185,14 @@ def amin(a, axis=None, out=None, keepdims=False): ---------- a : array_like Input data. - axis : int or tuple of ints, optional + axis : None or int or tuple of ints, optional Axis or axes along which to operate. By default, flattened input is used. + + .. versionadded: 1.7.0 + + If this is a tuple of ints, the minimum is selected over multiple axes, + instead of a single axis or all the axes as before. out : ndarray, optional Alternative output array in which to place the result. Must be of the same shape and buffer length as the expected output. @@ -2695,9 +2705,14 @@ def mean(a, axis=None, dtype=None, out=None, keepdims=False): a : array_like Array containing numbers whose mean is desired. If `a` is not an array, a conversion is attempted. - axis : int or tuple of ints, optional + axis : None or int or tuple of ints, optional Axis or axes along which the means are computed. The default is to compute the mean of the flattened array. + + .. versionadded: 1.7.0 + + If this is a tuple of ints, a mean is performed over multiple axes, + instead of a single axis or all the axes as before. dtype : data-type, optional Type to use in computing the mean. For integer inputs, the default is `float64`; for floating point inputs, it is the same as the @@ -2780,9 +2795,14 @@ def std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False): ---------- a : array_like Calculate the standard deviation of these values. - axis : int or tuple of ints, optional + axis : None or int or tuple of ints, optional Axis or axes along which the standard deviation is computed. The default is to compute the standard deviation of the flattened array. + + .. versionadded: 1.7.0 + + If this is a tuple of ints, a standard deviation is performed over + multiple axes, instead of a single axis or all the axes as before. dtype : dtype, optional Type to use in computing the standard deviation. For arrays of integer type the default is float64, for arrays of float types it is @@ -2883,9 +2903,14 @@ def var(a, axis=None, dtype=None, out=None, ddof=0, a : array_like Array containing numbers whose variance is desired. If `a` is not an array, a conversion is attempted. - axis : int or tuple of ints, optional + axis : None or int or tuple of ints, optional Axis or axes along which the variance is computed. The default is to compute the variance of the flattened array. + + .. versionadded: 1.7.0 + + If this is a tuple of ints, a variance is performed over multiple axes, + instead of a single axis or all the axes as before. dtype : data-type, optional Type to use in computing the variance. For arrays of integer type the default is `float32`; for arrays of float types it is the same as |