11.6.6. astroML.stats.mean_sigma¶
-
astroML.stats.
mean_sigma
(a, axis=None, dtype=None, ddof=0, keepdims=False)[source]¶ Compute mean and standard deviation for an array
- Parameters
- aarray_like
Array containing numbers whose mean is desired. If a is not an array, a conversion is attempted.
- axisint, optional
Axis along which the means are computed. The default is to compute the mean of the flattened array.
- dtypedtype, 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 the same as the array type.
- keepdimsbool, optional
If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the original arr.
- Returns
- mundarray, see dtype parameter above
array containing the mean values
- sigmandarray, see dtype parameter above.
array containing the standard deviation
See also
median_sigmaG
robust rank-based version of this calculation.
Notes
This routine simply calls
np.mean
andnp.std
, passing the keyword arguments to them. It is provided for ease of comparison with the function median_sigmaG()