title: Python - Numpy RGB pixel array to image
body: <p>I have an array of pixels</p>
  
  <pre><code>np.shape(pred2)
  Out[35]: (3000, 3, 32, 32)
  </code></pre>
  
  <p>It has 3000 images, 3 values rgb and is 32*32 in size for each image. I want to create an image from this.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>img = Image.new( 'RGB', (32,32), "black") # create a new black image
  pixels = img.putdata(pred2[1,:])
  </code></pre>
  
  <p>Can anyone give me a hand here as to what I am doing wrong?</p>