code: def rgb2xyz(rgb, dtype=None):
      """
      xyz = rgb2xyz(rgb, dtype={float})
  
      Convert RGB to XYZ coordinates
  
      The input is interpreted as sRGB. See Wikipedia for more details:
  
      https://en.wikipedia.org/wiki/SRGB
  
      Parameters
      ----------
      rgb : ndarray
      dtype : dtype, optional
          What dtype to return
  
      Returns
      -------
      xyz : ndarray
  
      See Also
      --------
      xyz2rgb : function
          The reverse function
      """
      transformation = np.array(
          [
              [0.4124, 0.3576, 0.1805],
              [0.2126, 0.7152, 0.0722],
              [0.0193, 0.1192, 0.9505],
          ]
      )
      rgb = rgb / 255.0
      a = 0.055
      rgb_linear_high = np.power((rgb + a) / (1.0 + a), 2.4)
      rgb_linear_low = rgb / 12.92
      rgb_linear = np.choose(
          rgb <= 0.04045, [rgb_linear_low, rgb_linear_high]
      )
      return _convert(rgb_linear, transformation, dtype, "rgb2xyz")
  
file_path: mahotas/mahotas/colors.py
imports: from __future__ import division
  import numpy
  from .internal import _check_3
label_desc: Use image node_id 3 for calling a global function with example usage: rgb2xyz(rgb, dtype) and returns: _convert