title: skimage: Why does rgb2gray from skimage.color result in a colored image?
body: <p>When I tried to convert the image to gray scale using:</p>
  
  <pre><code>from skimage.io import imread
  from skimage.color import rgb2gray
  mountain_r = rgb2gray(imread(os.getcwd() + '/mountain.jpg'))
  
  #Plot
  import matplotlib.pyplot as plt
  plt.figure(0)
  plt.imshow(mountain_r)
  plt.show()
  </code></pre>
  
  <p>I got a weird colored image instead of a gray scale.</p>
  
  <p>Manually implementing the function also gives me the same result. The custom function is:</p>
  
  <pre><code>def rgb2grey(rgb):
      if len(rgb.shape) is 3:
          return np.dot(rgb[...,:3], [0.299, 0.587, 0.114])
  
      else:
          print 'Current image is already in grayscale.'
          return rgb
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/mqgPr.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/mqgPr.jpg" alt="Original"></a></p>
  
  <p>Coloured image that is not in greyscale.
  <a href="https://i.stack.imgur.com/2X7lL.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/2X7lL.jpg" alt="gray"></a></p>
  
  <p>Why doesn't the function convert the image to greyscale?</p>