numpy 参考:https://mp.weixin.qq.com/s?__biz=MzU1MjYzNjQwOQ==&mid=2247486010&idx=1&sn=e42e6706e0e285ecbfdbbd76fb4ff352&chksm=fbfe50accc89d9ba56a3167c519638f1327a5c5bf12ed59dd8c6de9b2c25baeec1f1f8ad5fb7&
a=np.array([1,2,3,4]) b=np.arange(4) print(a,b) [1 2 3 4] [0 1 2 3]
对应相乘 c2=a*b [ 0 2 6 12]
对应相乘再求和 c3=a.dot(b) 20
相应位置平方 c4=b**2 [0 1 4 9]
数学函数工具求sin c5=np.sin(a) [ 0.84147098 0.90929743 0.14112001 -0.7568025 ]
print(np.sum(a))
print(np.min(a))
print(np.mean(a))