title: Convert black and white array into an image in python?
body: <p>I have an array of 50x50 elements of which each is either True or False - this represents a 50x50 black and white image.</p>
  
  <p>I can't convert this into image? I've tried countless different functions and none of them work.</p>
  
  <pre><code>import numpy as np
  from PIL import Image
  
  my_array = np.array([[True,False,False,False THE DATA IS IN THIS ARRAY OF 2500 elements]])
  
  im = Image.fromarray(my_array)
  
  im.save("results.jpg")
  </code></pre>
  
  <p>^ This one gives me: "Cannot handle this data type".</p>
  
  <p>I've seen that PIL has some functions but they only convert a list of RGB pixels and I have a simple black and white array without the other channels.</p>