MaskedArray.mean(axis=None, dtype=None, out=None, keepdims=)
[source]
Returns the average of the array elements along given axis.
Masked entries are ignored, and result elements which are not finite will be masked.
Refer to numpy.mean
for full documentation.
See also
ndarray.mean
numpy.mean
numpy.ma.average
>>> a = np.ma.array([1,2,3], mask=[False, False, True]) >>> a masked_array(data = [1 2 --], mask = [False False True], fill_value = 999999) >>> a.mean() 1.5
© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.12.0/reference/generated/numpy.ma.MaskedArray.mean.html