title: How to convert dataset with multiple images from np.array to PIL images
body: <p>I have an array of shape <code>(21785, 69, 69)</code> that I want to convert to PIL images. The images have a mean of 0 and are normalized with a maximum of 1. Furthermore they are grayscale images (as can be seen from the shape). For a single image, I found the solution of:</p>
  <pre><code>from PIL import Image
  image = Image.fromarray(image.astype('uint8') * 255, 'L')
  </code></pre>
  <p>How does this work for a set of images?
  Thank you for your help!</p>
  <p>Edit:</p>
  <p>when I use the whole set I get the error:</p>
  <pre><code>ValueError: Too many dimensions: 3 &gt; 2.
  </code></pre>