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: New `AffineTransform` from names, start and step.
  
  Parameters
  ----------
  innames : sequence of str or str
     The names of the axes of the domain.  If str, then names
     given by ``list(innames)``
  outnames : sequence of str or str
     The names of the axes of the range. If str, then names
     given by ``list(outnames)``
  start : sequence of float
     Start vector used in constructing affine transformation
  step : sequence of float
     Step vector used in constructing affine transformation
  domain_name : str, optional
     Name of domain CoordinateSystem
  range_name : str, optional
     Name of range CoordinateSystem
  
  Returns
  -------
  cm : `CoordinateMap`
  
  Examples
  --------
  >>> cm = AffineTransform.from_start_step('ijk', 'xyz', [1, 2, 3], [4, 5, 6])
  >>> cm.affine
  array([[ 4.,  0.,  0.,  1.],
         [ 0.,  5.,  0.,  2.],
         [ 0.,  0.,  6.,  3.],
         [ 0.,  0.,  0.,  1.]])
  
  Notes
  -----
  ``len(names) == len(start) == len(step)``
docstr_tok: ["New","`","AffineTransform","`","from","names",",","start","and","step",".","Parameters","--","--","--","--","--","innames",":","sequence","of","str","or","str","The","names","of","the","axes","of","the","domain",".","If","str",",","then","names","given","by","``","list","(","innames",")","``","outnames",":","sequence","of","str","or","str","The","names","of","the","axes","of","the","range",".","If","str",",","then","names","given","by","``","list","(","outnames",")","``","start",":","sequence","of","float","Start","vector","used","in","constructing","affine","transformation","step",":","sequence","of","float","Step","vector","used","in","constructing","affine","transformation","domain_name",":","str",",","optional","Name","of","domain","CoordinateSystem","range_name",":","str",",","optional","Name","of","range","CoordinateSystem","Returns","--","--","--","-","cm",":","`","CoordinateMap","`","Examples","--","--","--","--",">",">",">","cm","=","AffineTransform.from_start_step","(","'ijk","'",",","'xyz","'",",","[","1",",","2",",","3","]",",","[","4",",","5",",","6","]",")",">",">",">","cm.affine","array","(","[","[","4.",",","0.",",","0.",",","1",".","]",",","[","0.",",","5.",",","0.",",","2",".","]",",","[","0.",",","0.",",","6.",",","3",".","]",",","[","0.",",","0.",",","0.",",","1",".","]","]",")","Notes","--","--","-","``","len","(","names",")","==","len","(","start",")","==","len","(","step",")","``"]
code: def from_start_step(
      innames, outnames, start, step, domain_name="", range_name=""
  ):
      """New `AffineTransform` from names, start and step.
  
      Parameters
      ----------
      innames : sequence of str or str
         The names of the axes of the domain.  If str, then names
         given by ``list(innames)``
      outnames : sequence of str or str
         The names of the axes of the range. If str, then names
         given by ``list(outnames)``
      start : sequence of float
         Start vector used in constructing affine transformation
      step : sequence of float
         Step vector used in constructing affine transformation
      domain_name : str, optional
         Name of domain CoordinateSystem
      range_name : str, optional
         Name of range CoordinateSystem
  
      Returns
      -------
      cm : `CoordinateMap`
  
      Examples
      --------
      >>> cm = AffineTransform.from_start_step('ijk', 'xyz', [1, 2, 3], [4, 5, 6])
      >>> cm.affine
      array([[ 4.,  0.,  0.,  1.],
             [ 0.,  5.,  0.,  2.],
             [ 0.,  0.,  6.,  3.],
             [ 0.,  0.,  0.,  1.]])
  
      Notes
      -----
      ``len(names) == len(start) == len(step)``
      """
      ndim = len(innames)
      if len(outnames) != ndim:
          raise ValueError("len(innames) != len(outnames)")
      return AffineTransform.from_params(
          innames,
          outnames,
          (np.diag(step), start),
          domain_name=domain_name,
          range_name=range_name,
      )
  
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 4 for calling the AffineTransform obj's underlying member method code with example usage: obj.from_start_step(innames, outnames, start, step, domain_name, range_name) and returns: AffineTransform