【发布时间】:2020-01-06 14:31:45
【问题描述】:
我对自己做错了什么感到困惑。
我有以下代码:
import numpy as np
from scipy import stats
df
Out[29]: array([66., 69., 67., 75., 69., 69.])
val = 73.94
z1 = stats.percentileofscore(df, val)
print(z1)
Out[33]: 83.33333333333334
np.percentile(df, z1)
Out[34]: 69.999999999
我期待np.percentile(df, z1) 会回我val = 73.94
【问题讨论】:
标签: numpy scipy python-3.5