Takes a numpy array and returns a PIL image. The mode of the PIL image depends on the array shape, the pal keyword, and the mode keyword.
For 2-D arrays, if pal is a valid (N,3) byte-array giving the RGB values (from 0 to 255) then mode=’P’, otherwise mode=’L’, unless mode is given as ‘F’ or ‘I’ in which case a float and/or integer array is made
if the
The numpy array must be either 2 dimensional or 3 dimensional.