I want to reshape array of shape (2, *(x, y)) to (1, *(x,y), 2) while preserving the values of (x, y)?
(2, *(x,y)) where 2 represents the frames of game screen with (x, y) being an array with pixel values. I wish to convert it into an array of shape of (1, *(x, y), 2), such that the number 2 still represents the frame index, while (x,y) array value is preserved. 1 will be used to index the batch for training the neural network.
numpy.reshape(1, *(x,y), 2) doesn't preserve the (x,y) array.