在python中导入numpy包
N=5
weights = np.ones(N)/N //这里就相当于创建了一个数组,且为5个1/5的数组
print "weights", weights
------->weights [0.2 0.2 0.2 0.2 0.2]