Saving a Numpy array as an image
I attach an simple routine to convert a npy to an image. Works 100% and it is a piece of cake!
from PIL import Image
import matplotlib
img = np.load('flair1_slice75.npy')
matplotlib.image.imsave("G1_flair_75.jpeg", img)
I have a matrix in the type of a Numpy array.  How would I write it to disk it as an image?  Any format works (png, jpeg, bmp...).  One important constraint is that PIL is not present.