I have a numpy matrix of images with shape (50, 17500). Each image has shape (50, 50), so my matrix is like a long row of 350 grayscale images.
I want to use plt.imshow()
to display those images. How do I change the dimension of the concatenated images matrix? Say reshaping the array to shape (1750, 500), which is 35 rows and 10 columns of images.
Some posts suggest to use np.reshape()
, but if I use my_array.reshape((1750, 500))
the individual image in the new matrix is broken.
My question is how to reshape while preserving each individual (50,50) image?