In [15]: import numpy as np In [16]: a=(70,80,60) In [17]: np.mean(a) #平均值 Out[17]: 70.0 In [18]: np.average(a,weights=[3,3,4]) #加权平均值 Out[18]: 69.0