import numpy as np
a = np.arange(12).reshape(3, 4)
print(a)
#求和
print(a.sum())
#axis=1 为行 axis=0为列(统计方法里轴是相反的)
print(a.sum(axis=1)) #每行的和
#平均
print(a.mean())
#最大值
print(a.max())
#标准差
print(a.std())
#方差
print(a.var())
#累计和
print(a.cumsum())
#累计乘积
print(a.cumprod())