class_docstr: A transform is a representation of a transformation from one 3D space to
  another. It is composed of a coordinate mapping, or its inverse, as well
  as the name of the input and output spaces.
  
  The Transform class is the base class for transformations and defines
  the transform object API.
docstr: Create a new transform object.
  
  Parameters
  ----------
  
  mapping: callable f(x, y, z)
      Callable mapping coordinates from the input space to
      the output space. It should take 3 numbers or arrays,
      and return 3 numbers or arrays of the same shape.
  inverse_mapping: callable f(x, y, z)
      Callable mapping coordinates from the output space to
      the input space. It should take 3 numbers or arrays,
      and return 3 numbers or arrays of the same shape.
  input_space: string
      Name of the input space
  output_space: string
      Name of the output space
  
  Notes
  ------
  
  You need to supply either the mapping or the inverse mapping.
docstr_tok: ["Create","a","new","transform","object",".","Parameters","--","--","--","--","--","mapping",":","callable","f","(","x",",","y",",","z",")","Callable","mapping","coordinates","from","the","input","space","to","the","output","space",".","It","should","take","3","numbers","or","arrays",",","and","return","3","numbers","or","arrays","of","the","same","shape",".","inverse_mapping",":","callable","f","(","x",",","y",",","z",")","Callable","mapping","coordinates","from","the","output","space","to","the","input","space",".","It","should","take","3","numbers","or","arrays",",","and","return","3","numbers","or","arrays","of","the","same","shape",".","input_space",":","string","Name","of","the","input","space","output_space",":","string","Name","of","the","output","space","Notes","--","--","--","You","need","to","supply","either","the","mapping","or","the","inverse","mapping","."]
code: def __init__(
      self,
      input_space,
      output_space,
      mapping=None,
      inverse_mapping=None,
  ):
      """Create a new transform object.
  
      Parameters
      ----------
  
      mapping: callable f(x, y, z)
          Callable mapping coordinates from the input space to
          the output space. It should take 3 numbers or arrays,
          and return 3 numbers or arrays of the same shape.
      inverse_mapping: callable f(x, y, z)
          Callable mapping coordinates from the output space to
          the input space. It should take 3 numbers or arrays,
          and return 3 numbers or arrays of the same shape.
      input_space: string
          Name of the input space
      output_space: string
          Name of the output space
  
      Notes
      ------
  
      You need to supply either the mapping or the inverse mapping.
      """
      if inverse_mapping is None and mapping is None:
          raise ValueError(
              "You need to supply either the coordinate mapping or "
              "the inverse coordinate mapping"
          )
      if mapping is not None:
          assert callable(
              mapping
          ), "The mapping argument of a Transform must be callable"
      if inverse_mapping is not None:
          assert callable(
              inverse_mapping
          ), "The inverse_mapping argument of a Transform must be callable"
      self.mapping = mapping
      self.inverse_mapping = inverse_mapping
      self.input_space = input_space
      self.output_space = output_space
  
file_path: nipy/nipy/labs/datasets/transforms/transform.py
label_desc: Use image node_id 1 to create a new Transform object  with example: obj = Transform(input_space, output_space, mapping, inverse_mapping)