1、求平均数:
.mean()方法
1 import numpy 2 list=[] 3 for i in range(10): 4 list.append(i) 5 print(list) 6 avg=numpy.mean(list) 7 print(avg)
1、求平均数:
.mean()方法
1 import numpy 2 list=[] 3 for i in range(10): 4 list.append(i) 5 print(list) 6 avg=numpy.mean(list) 7 print(avg)
转载于:https://www.cnblogs.com/songxiaonan/p/6268878.html