In case there is a range of image say the dimensions is said to be (45,128,128) and I have displayed it. Seeing the result now I have decided that I need a range of images between, say, 25-36 so I end up writing a loop in order to display the interested range of image
import itertools as it
for i in it.chain(range(25,32)):
img_disp = (x1[i]) #x1 is the input image with dimension (45,128,128)
plt.imshow(img_disp)
plt.show()
#displays the desired images of given range 25-32
Now this displays an array of images from 25-32, now how do i save this particluar array of images as a single (with dimension (8,128,128)) .npy file?
You should try: