title: Converting from numpy arrays to a RGB image
body: <p>I have three (241, 241) numpy arrays which I would like to treat as the Red, Green and Blue components of an image.</p>
  
  <p>I have tried this:</p>
  
  <pre><code>import numpy as np
  from PIL import Image
  
  arr = np.zeros((len(x), len(z), 3))
  
  arr[:,:,0] = red_arr
  arr[:,:,1] = green_arr
  arr[:,:,2] = blue_arr
  
  img = Image.fromarray(arr, 'RGB')
  
  img.show()
  </code></pre>
  
  <p>But the resulting image just looks like noise:</p>
  
  <p><a href="https://i.stack.imgur.com/FxCGO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FxCGO.jpg" alt="enter image description here"></a></p>
  
  <p>Can anyone tell me what I am doing wrong please?</p>
  
  <p>As an example, my red_arr is an array of floats that looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/XfFhA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XfFhA.png" alt="enter image description here"></a></p>