a = np.arange(10).reshape(1,1,10)# array([[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]]) a = np.squeeze(a)unsqueeze 扩展某个维度,与squeeze互逆,不增加数据
a = np.expand_dims(a,axis=-1)在某个维度复制,增加数据
a = np.arange(64*64).reshape(1,64,64,1) a = np.expand_dims(a,0).repeat(1000,axis=0)cat合并以增加维度
a = np.concatenate([a, a], axis=3)delete
np.delete(sample, idx, 0) # np.delete(array,所在轴的位置,axis)
https://numpy.org/



