code: def rgb2grey(array, dtype=float):
      """
      grey = rgb2grey(rgb_image, dtype=float)
  
      Convert an RGB image to a grayscale image
  
      The interpretation of RGB and greyscale values is very much object
      dependent (as anyone who has used an overhead projector which mangled their
      colour figures will have experienced). This function uses a typical method
      for conversion and will work acceptably well for typical use cases, but if
      you have strict requirements, consider implementing the conversion by
      yourself for fine control.
  
      Parameters
      ----------
      array : ndarray of shape (a,b,3)
      dtype : dtype, optional
          dtype of return
  
      Returns
      -------
      grey : ndarray of ``dtype``
      """
      _check_3(array, "rgb2grey")
      transform = np.array([0.30, 0.59, 0.11])
      transformed = np.dot(array, transform)
      return transformed.astype(dtype, copy=False)
  
file_path: mahotas/mahotas/colors.py
imports: from __future__ import division
  import numpy
  from .internal import _check_3
label_desc: Use image node_id 1 for calling a global function with example usage: rgb2grey(array, dtype) and returns: transformed