本文簡要介紹 python 語言中 scipy.stats.mstats.find_repeats
的用法。
用法:
scipy.stats.mstats.find_repeats(arr)#
查找 arr 中的重複項並返回一個元組(repeats, repeat_count)。
輸入被轉換為 float64。屏蔽值將被丟棄。
- arr: 序列
輸入數組。如果數組不是一維,則數組將被展平。
- repeats: ndarray
重複值的數組。
- counts: ndarray
計數數組。
參數 ::
返回 ::
例子:
>>> from scipy.stats import mstats >>> mstats.find_repeats([2, 1, 2, 3, 2, 2, 5]) (array([2.]), array([4]))
在上麵的示例中,2 重複了 4 次。
>>> mstats.find_repeats([[10, 20, 1, 2], [5, 5, 4, 4]]) (array([4., 5.]), array([2, 2]))
在上麵的例子中,4和5都重複了2次。
相關用法
- Python SciPy mstats.trim用法及代碼示例
- Python SciPy mstats.winsorize用法及代碼示例
- Python SciPy mstats.argstoarray用法及代碼示例
- Python SciPy mstats.trima用法及代碼示例
- Python SciPy mstats.tmin用法及代碼示例
- Python SciPy mstats.tmax用法及代碼示例
- 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.tmean用法及代碼示例
- 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 matlab.loadmat用法及代碼示例
- Python SciPy misc.ascent用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.stats.mstats.find_repeats。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。