本文簡要介紹 python 語言中 scipy.stats.mstats.trima
的用法。
用法:
scipy.stats.mstats.trima(a, limits=None, inclusive=(True, True))#
通過掩蓋某些給定限製之外的數據來修剪數組。
返回輸入數組的掩碼版本。
- a: array_like
輸入數組。
- limits: {無,元組},可選
絕對值的(下限,上限)元組。低於(大於)下限(上限)的輸入數組的值將被屏蔽。限製為 None 表示開放區間。
- inclusive: (bool, bool) 元組,可選
(lower flag, upper flag) 的元組,指示是否允許完全等於下(上限)限製的值。
參數 ::
例子:
>>> from scipy.stats.mstats import trima >>> import numpy as np
>>> a = np.arange(10)
區間為left-closed和right-open,即[2, 8)。通過僅保留區間中的值來修剪數組。
>>> trima(a, limits=(2, 8), inclusive=(True, False)) masked_array(data=[--, --, 2, 3, 4, 5, 6, 7, --, --], mask=[ True, True, False, False, False, False, False, False, True, True], fill_value=999999)
相關用法
- Python SciPy mstats.trim用法及代碼示例
- Python SciPy mstats.tmin用法及代碼示例
- Python SciPy mstats.tmax用法及代碼示例
- Python SciPy mstats.tmean用法及代碼示例
- 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.trima。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。