Scipy is a (set of) open source Python modules for scientific/mathematical/engineering stuff. I (try to) use it instead of Matlab or its open source clone Octave because I don't like Matlab's scripting language and prefer Python's programming features.
If you want to store a 2D array (aka matrix) to an image file, the default behaviour of Scipy's imsave() function is to rescale the matrix to a 0-255 range (like Matlab's imagesc() function). For example:
