Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.ma.masked_array.mean

masked_array.mean(axis=None,dtype=None,out=None,keepdims=<class numpy._globals._NoValue>)[source]

Returns the average of the array elements along given axis.

Masked entries are ignored, and result elements which are notfinite will be masked.

Refer tonumpy.mean for full documentation.

See also

ndarray.mean
corresponding function for ndarrays
numpy.mean
Equivalent function
numpy.ma.average
Weighted average.

Examples

>>>a=np.ma.array([1,2,3],mask=[False,False,True])>>>amasked_array(data = [1 2 --],             mask = [False False  True],       fill_value = 999999)>>>a.mean()1.5
  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Jun 10, 2017.
  • Created usingSphinx 1.5.3.

[8]ページ先頭

©2009-2025 Movatter.jp