class_docstr: A set of domain and range CoordinateSystems and a function between them.
  
  For example, the function may represent the mapping of a voxel (the
  domain of the function) to real space (the range).  The function may
  be an affine or non-affine transformation.
  
  Attributes
  ----------
  function_domain : :class:`CoordinateSystem` instance
     The input coordinate system.
  function_range : :class:`CoordinateSystem` instance
     The output coordinate system.
  function : callable
     A callable that maps the function_domain to the function_range.
  inverse_function : None or callable
     A callable that maps the function_range to the function_domain.
     Not all functions have an inverse, in which case inverse_function
     is None.
  
  Examples
  --------
  >>> function_domain = CoordinateSystem('ijk', 'voxels')
  >>> function_range = CoordinateSystem('xyz', 'world')
  >>> mni_orig = np.array([-90.0, -126.0, -72.0])
  >>> function = lambda x: x + mni_orig
  >>> inv_function = lambda x: x - mni_orig
  >>> cm = CoordinateMap(function_domain, function_range, function, inv_function)
  
  Map the first 3 voxel coordinates, along the x-axis, to mni space:
  
  >>> x = np.array([[0,0,0], [1,0,0], [2,0,0]])
  >>> cm.function(x)
  array([[ -90., -126.,  -72.],
         [ -89., -126.,  -72.],
         [ -88., -126.,  -72.]])
  
  >>> x = CoordinateSystem('x')
  >>> y = CoordinateSystem('y')
  >>> m = CoordinateMap(x, y, np.exp, np.log)
  >>> m
  CoordinateMap(
     function_domain=CoordinateSystem(coord_names=('x',), name='', coord_dtype=float64),
     function_range=CoordinateSystem(coord_names=('y',), name='', coord_dtype=float64),
     function=<ufunc 'exp'>,
     inverse_function=<ufunc 'log'>
    )
  >>> m.inverse()
  CoordinateMap(
     function_domain=CoordinateSystem(coord_names=('y',), name='', coord_dtype=float64),
     function_range=CoordinateSystem(coord_names=('x',), name='', coord_dtype=float64),
     function=<ufunc 'log'>,
     inverse_function=<ufunc 'exp'>
    )
class_docstr_tok: ["A","set","of","domain","and","range","CoordinateSystems","and","a","function","between","them",".","For","example",",","the","function","may","represent","the","mapping","of","a","voxel","(","the","domain","of","the","function",")","to","real","space","(","the","range",")",".","The","function","may","be","an","affine","or","non-affine","transformation",".","Attributes","--","--","--","--","--","function_domain",":",":","class",":","`","CoordinateSystem","`","instance","The","input","coordinate","system",".","function_range",":",":","class",":","`","CoordinateSystem","`","instance","The","output","coordinate","system",".","function",":","callable","A","callable","that","maps","the","function_domain","to","the","function_range",".","inverse_function",":","None","or","callable","A","callable","that","maps","the","function_range","to","the","function_domain",".","Not","all","functions","have","an","inverse",",","in","which","case","inverse_function","is","None",".","Examples","--","--","--","--",">",">",">","function_domain","=","CoordinateSystem","(","'ijk","'",",","'voxels","'",")",">",">",">","function_range","=","CoordinateSystem","(","'xyz","'",",","'world","'",")",">",">",">","mni_orig","=","np.array","(","[","-90.0",",","-126.0",",","-72.0","]",")",">",">",">","function","=","lambda","x",":","x","+","mni_orig",">",">",">","inv_function","=","lambda","x",":","x","-","mni_orig",">",">",">","cm","=","CoordinateMap","(","function_domain",",","function_range",",","function",",","inv_function",")","Map","the","first","3","voxel","coordinates",",","along","the","x-axis",",","to","mni","space",":",">",">",">","x","=","np.array","(","[","[","0,0,0","]",",","[","1,0,0","]",",","[","2,0,0","]","]",")",">",">",">","cm.function","(","x",")","array","(","[","[","-90.",",","-126.",",","-72",".","]",",","[","-89.",",","-126.",",","-72",".","]",",","[","-88.",",","-126.",",","-72",".","]","]",")",">",">",">","x","=","CoordinateSystem","(","'","x","'",")",">",">",">","y","=","CoordinateSystem","(","'","y","'",")",">",">",">","m","=","CoordinateMap","(","x",",","y",",","np.exp",",","np.log",")",">",">",">","m","CoordinateMap","(","function_domain=CoordinateSystem","(","coord_names=","(","'","x","'",",",")",",","name=","''",",","coord_dtype=float64",")",",","function_range=CoordinateSystem","(","coord_names=","(","'","y","'",",",")",",","name=","''",",","coord_dtype=float64",")",",","function=","<","ufunc","'exp","'",">",",","inverse_function=","<","ufunc","'log","'",">",")",">",">",">","m.inverse","(",")","CoordinateMap","(","function_domain=CoordinateSystem","(","coord_names=","(","'","y","'",",",")",",","name=","''",",","coord_dtype=float64",")",",","function_range=CoordinateSystem","(","coord_names=","(","'","x","'",",",")",",","name=","''",",","coord_dtype=float64",")",",","function=","<","ufunc","'log","'",">",",","inverse_function=","<","ufunc","'exp","'",">",")"]
docstr: Does `other` have similar coordinate systems and same mappings?
  
  A "similar" coordinate system is one with the same coordinate names and
  data dtype, but ignoring the coordinate system name.
docstr_tok: ["Does","`","other","`","have","similar","coordinate","systems","and","same","mappings","?","A","``","similar","''","coordinate","system","is","one","with","the","same","coordinate","names","and","data","dtype",",","but","ignoring","the","coordinate","system","name","."]
code: def similar_to(self, other):
      """Does `other` have similar coordinate systems and same mappings?
  
      A "similar" coordinate system is one with the same coordinate names and
      data dtype, but ignoring the coordinate system name.
      """
      return (
          isinstance(other, self.__class__)
          and (self.function == other.function)
          and (self.function_domain.similar_to(other.function_domain))
          and (self.function_range.similar_to(other.function_range))
          and (self.inverse_function == other.inverse_function)
      )
  
imports: import warnings
  import numpy
  import numpy.linalg
  from nibabel import io_orientation
  from nibabel.affines import from_matvec, to_matvec
  from .coordinate_system import CoordinateSystem, is_coordsys, safe_dtype
  from .coordinate_system import product
label_desc: Use image node_id 14 for calling the CoordinateMap obj's underlying member method code with example usage: obj.similar_to(other) and returns: unknown