np.tile()函数:
np.tile(a,(x,y,z))
表示将数组a在行上重复x次, 在列上重复y次,在第三维度上重复
a = np.array([1,2,3]) print(a.shape) print(a) a = np.tile(a,(8,2)) print(a.shape) print(a) ''' (3,) [1 2 3] (8, 6) [[1 2 3 1 2 3] [1 2 3 1 2 3] [1 2 3 1 2 3] [1 2 3 1 2 3] [1 2 3 1 2 3] [1 2 3 1 2 3] [1 2 3 1 2 3] [1 2 3 1 2 3]] '''
复z次。