📜  列表python代码示例上的阈值交叉

📅  最后修改于: 2022-03-11 14:46:30.780000             🧑  作者: Mango

代码示例1
>>> a = np.array([9, 9, 6, 3, 1, 6, 1, 0, 0, 8])
>>> from scipy import stats
>>> stats.threshold(a, threshmin=2, threshmax=8, newval=-1)
array([-1, -1,  6,  3, -1,  6, -1, -1, -1,  8])