title: python - matplotlib.pyplot saves binary mask with 4 channels(?)
body: <p>I'm trying to save binary masks, i.e. arrays with False and True values, as .png files.</p>
  
  <p>However, when doing so with matplotlib.pyplot, it saves the image with 4 channels and I don't know why.</p>
  
  <p>For example to save the image:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib.cm as cm
  
  m = np.array([[False, True],
               [False, True]])
  
  plt.imsave("mask.png", m, cmap=cm.gray)
  </code></pre>
  
  <p>Then reading it again and printing the shape:</p>
  
  <pre><code>plt.imread("mask.png").shape
  </code></pre>
  
  <p>Gives me:</p>
  
  <p>(2, 2, 4)</p>
  
  <p>Any reason for that and how to just save it as plain grayscale with 0/1 values so that the shape essentially will just be (2,2)?</p>