I have a 2D numpy array stores values from 0 to 1000, for example
a = [[21 545 953]
[43 632 423]]
I want to save this array to an image (.png) without scaling all the values to 0 - 255. I tried sp.misc.toimage
but it seems it always scale the data. Any idea how to do this?