human
Saving a Numpy array as an image
assistant
Here is some code to save a numpy array `image_array` as an image 'outfile.jpg'

scipy.misc.imsave('outfile.jpg', image_array)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.