title: Making an image black and white in python without pillow
body: <pre><code>import matplotlib.pyplot as plt
  import matplotlib.image as mpimg
  import numpy as np
  
  img=mpimg.imread('2048.png')
  
  a = np.zeros_like(img)
  
  for j in xrange(img.shape[0]):
      for i in xrange(img.shape[1]):
          a[j,i] = np.mean(img[j,i])
  
  imgplot = plt.imshow(a)
  plt.show()
  </code></pre>
  
  <p>This is what I have so far and it works, but it's very slow because it only edits 1 pixel at the time, what is a clever way of using arrays to make an image grey? And I can't use functions like convert("L").</p>