saving numpy array as image with pil code example
Example 1: ndarray to pil image
from PIL import Image
image_from_array = Image.fromarray(nd_array)
Example 2: save numpy arrayw with PIL
from PIL import Image
im = Image.fromarray(A)
im.save("your_file.jpeg")