class_docstr: Class for affine transformation from domain to a range
  
  This class has an affine attribute, which is a matrix representing
  the affine transformation in homogeneous coordinates.  This matrix
  is used to evaluate the function, rather than having an explicit
  function (as is the case for a CoordinateMap).
  
  Examples
  --------
  >>> inp_cs = CoordinateSystem('ijk')
  >>> out_cs = CoordinateSystem('xyz')
  >>> cm = AffineTransform(inp_cs, out_cs, np.diag([1, 2, 3, 1]))
  >>> cm
  AffineTransform(
     function_domain=CoordinateSystem(coord_names=('i', 'j', 'k'), name='', coord_dtype=float64),
     function_range=CoordinateSystem(coord_names=('x', 'y', 'z'), name='', coord_dtype=float64),
     affine=array([[ 1.,  0.,  0.,  0.],
                   [ 0.,  2.,  0.,  0.],
                   [ 0.,  0.,  3.,  0.],
                   [ 0.,  0.,  0.,  1.]])
  )
  
  >>> cm.affine
  array([[ 1.,  0.,  0.,  0.],
         [ 0.,  2.,  0.,  0.],
         [ 0.,  0.,  3.,  0.],
         [ 0.,  0.,  0.,  1.]])
  >>> cm([1,1,1])
  array([ 1.,  2.,  3.])
  >>> icm = cm.inverse()
  >>> icm([1,2,3])
  array([ 1.,  1.,  1.])
class_docstr_tok: ["Class","for","affine","transformation","from","domain","to","a","range","This","class","has","an","affine","attribute",",","which","is","a","matrix","representing","the","affine","transformation","in","homogeneous","coordinates",".","This","matrix","is","used","to","evaluate","the","function",",","rather","than","having","an","explicit","function","(","as","is","the","case","for","a","CoordinateMap",")",".","Examples","--","--","--","--",">",">",">","inp_cs","=","CoordinateSystem","(","'ijk","'",")",">",">",">","out_cs","=","CoordinateSystem","(","'xyz","'",")",">",">",">","cm","=","AffineTransform","(","inp_cs",",","out_cs",",","np.diag","(","[","1",",","2",",","3",",","1","]",")",")",">",">",">","cm","AffineTransform","(","function_domain=CoordinateSystem","(","coord_names=","(","'","i","'",",","'","j","'",",","'","k","'",")",",","name=","''",",","coord_dtype=float64",")",",","function_range=CoordinateSystem","(","coord_names=","(","'","x","'",",","'","y","'",",","'","z","'",")",",","name=","''",",","coord_dtype=float64",")",",","affine=array","(","[","[","1.",",","0.",",","0.",",","0",".","]",",","[","0.",",","2.",",","0.",",","0",".","]",",","[","0.",",","0.",",","3.",",","0",".","]",",","[","0.",",","0.",",","0.",",","1",".","]","]",")",")",">",">",">","cm.affine","array","(","[","[","1.",",","0.",",","0.",",","0",".","]",",","[","0.",",","2.",",","0.",",","0",".","]",",","[","0.",",","0.",",","3.",",","0",".","]",",","[","0.",",","0.",",","0.",",","1",".","]","]",")",">",">",">","cm","(","[","1,1,1","]",")","array","(","[","1.",",","2.",",","3",".","]",")",">",">",">","icm","=","cm.inverse","(",")",">",">",">","icm","(","[","1,2,3","]",")","array","(","[","1.",",","1.",",","1",".","]",")"]
docstr: Create a copy of the AffineTransform.
  
  Returns
  -------
  affine_transform : AffineTransform
  
  Examples
  --------
  >>> import copy
  >>> cm = AffineTransform(CoordinateSystem('ijk'), CoordinateSystem('xyz'), np.eye(4))
  >>> cm_copy = copy.copy(cm)
  >>> cm is cm_copy
  False
  
  Note that the matrix (affine) is not a pointer to the
  same data, it's a full independent copy
  
  >>> cm.affine[0,0] = 2.0
  >>> cm_copy.affine[0,0]
  1.0
docstr_tok: ["Create","a","copy","of","the","AffineTransform",".","Returns","--","--","--","-","affine_transform",":","AffineTransform","Examples","--","--","--","--",">",">",">","import","copy",">",">",">","cm","=","AffineTransform","(","CoordinateSystem","(","'ijk","'",")",",","CoordinateSystem","(","'xyz","'",")",",","np.eye","(","4",")",")",">",">",">","cm_copy","=","copy.copy","(","cm",")",">",">",">","cm","is","cm_copy","False","Note","that","the","matrix","(","affine",")","is","not","a","pointer","to","the","same","data",",","it","'s","a","full","independent","copy",">",">",">","cm.affine","[","0,0","]","=","2.0",">",">",">","cm_copy.affine","[","0,0","]","1.0"]
code: def __copy__(self):
      """Create a copy of the AffineTransform.
  
      Returns
      -------
      affine_transform : AffineTransform
  
      Examples
      --------
      >>> import copy
      >>> cm = AffineTransform(CoordinateSystem('ijk'), CoordinateSystem('xyz'), np.eye(4))
      >>> cm_copy = copy.copy(cm)
      >>> cm is cm_copy
      False
  
      Note that the matrix (affine) is not a pointer to the
      same data, it's a full independent copy
  
      >>> cm.affine[0,0] = 2.0
      >>> cm_copy.affine[0,0]
      1.0
      """
      return AffineTransform(
          self.function_domain, self.function_range, self.affine.copy()
      )
  
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 11 for calling the AffineTransform obj's underlying member method code with example usage: obj.__copy__() and returns: AffineTransform