11.6.6. astroML.stats.mean_sigma¶
- astroML.stats.mean_sigma(a, axis=None, dtype=None, ddof=0, keepdims=False)¶
Compute mean and standard deviation for an array
Parameters : a : array_like
Array containing numbers whose mean is desired. If a is not an array, a conversion is attempted.
axis : int, optional
Axis along which the means are computed. The default is to compute the mean of the flattened array.
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 the same as the array type.
keepdims : bool, 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 : mu : ndarray, see dtype parameter above
array containing the mean values
sigma : ndarray, 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 and np.std, passing the keyword arguments to them. It is provided for ease of comparison with the function median_sigmaG()