数组运算
In:
#首先创建两个数组
data1 = np.array([1,2])
data2 = np.ones(2)
print(data1,data2)[1 2] [1. 1.]
#数组间加减乘除
jia = data1+data2
jian = data1-data2
cheng = data1*data2
chu = data1/data2
#数组与单个数值的操作
shuzhi1 = data1*100
shuzhi2 = data1/100
print(jia,jian,cheng,chu,shuzhi1,shuzhi2)[2. 3.] [0. 1.] [1. 2.] [1. 2.] [100 200] [0.01 0.02]