np.mean直接计算平均数
np.average计算加权平均数(如果有权重weight的话)
部分源码
np.mean:12345try: mean = a.meanexcept AttributeError: return _wrapit(a, 'mean', axis, dtype, out)return mean(axis, dtype, out)
np.average:
|
|
np.mean直接计算平均数
np.average计算加权平均数(如果有权重weight的话)
部分源码
np.mean:12345try: mean = a.meanexcept AttributeError: return _wrapit(a, 'mean', axis, dtype, out)return mean(axis, dtype, out)
np.average:
|
|