均值:np.mean()

中位数:np.median()

众数在numpy中没有直接计算的函数。

  • 需要借助counts = np.dincount()、np.argmax(counts)方可计算。

使用python-numpy计算均值、中位数、众数方法

相关文章: