np.zeros((a,b,c))
1 np.zeros内参数个数代表生成数组维数。a, b, c,依次表示外层到内层。 2 3 >>> np.zeros((1, 5)) 4 5 #Out: 6 [[0. 0. 0. 0. 0.]] 7 8 >>> np.zeros((2,3,5)) 9 10 #Out: 11 [[[0. 0. 0. 0. 0.] 12 [0. 0. 0. 0. 0.] 13 [0. 0. 0. 0. 0.]] 14 15 [[0. 0. 0. 0. 0.] 16 [0. 0. 0. 0. 0.] 17 [0. 0. 0. 0. 0.]]]