本文簡要介紹 python 語言中 scipy.stats.mstats.tmean
的用法。
用法:
scipy.stats.mstats.tmean(a, limits=None, inclusive=(True, True), axis=None)#
計算修剪後的平均值。
- a: array_like
值數組。
- limits: 無或(下限、上限),可選
輸入數組中小於下限或大於上限的值將被忽略。當限製為無(默認)時,則使用所有值。元組中的任何一個限製值也可以是 None 表示半開區間。
- inclusive: (布爾,布爾),可選
由 (lower flag, upper flag) 組成的元組。這些標誌確定是否包含完全等於下限或上限的值。默認值為 (True, True)。
- axis: int 或無,可選
操作的軸。如果沒有,計算整個數組。默認為無。
- tmean: 浮點數
參數 ::
返回 ::
注意:
有關
tmean
的更多詳細信息,請參閱scipy.stats.tmean
。例子:
>>> import numpy as np >>> from scipy.stats import mstats >>> a = np.array([[6, 8, 3, 0], ... [3, 9, 1, 2], ... [8, 7, 8, 2], ... [5, 6, 0, 2], ... [4, 5, 5, 2]]) ... ... >>> mstats.tmean(a, (2,5)) 3.3 >>> mstats.tmean(a, (2,5), axis=0) masked_array(data=[4.0, 5.0, 4.0, 2.0], mask=[False, False, False, False], fill_value=1e+20)
相關用法
- Python SciPy mstats.tmin用法及代碼示例
- Python SciPy mstats.tmax用法及代碼示例
- Python SciPy mstats.trim用法及代碼示例
- Python SciPy mstats.trima用法及代碼示例
- Python SciPy mstats.winsorize用法及代碼示例
- Python SciPy mstats.argstoarray用法及代碼示例
- Python SciPy mstats.kruskalwallis用法及代碼示例
- Python SciPy mstats.sem用法及代碼示例
- Python SciPy mstats.zscore用法及代碼示例
- Python SciPy mstats.zmap用法及代碼示例
- Python SciPy mstats.mode用法及代碼示例
- Python SciPy mstats.hmean用法及代碼示例
- Python SciPy mstats.variation用法及代碼示例
- Python SciPy mstats.compare_medians_ms用法及代碼示例
- Python SciPy mstats.gmean用法及代碼示例
- Python SciPy mstats.pearsonr用法及代碼示例
- Python SciPy mstats.kruskal用法及代碼示例
- Python SciPy mstats.mquantiles用法及代碼示例
- Python SciPy mstats.count_tied_groups用法及代碼示例
- Python SciPy mstats.chisquare用法及代碼示例
- Python SciPy mstats.describe用法及代碼示例
- Python SciPy mstats.sen_seasonal_slopes用法及代碼示例
- Python SciPy mstats.find_repeats用法及代碼示例
- Python SciPy matlab.loadmat用法及代碼示例
- Python SciPy misc.ascent用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.stats.mstats.tmean。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。