I am trying to save a numpy array of dimensions 128x128 pixels into a grayscale image. I simply thought that the pyplot.imsave function would do the job but it\'s not, it so
There is also a possibility to use scikit-image, then there is no need to convert numpy array into a PIL object.
from skimage import io io.imsave('output.tiff', I.astype(np.uint16))