class_docstr: An ordered sequence of named coordinates of a specified dtype.
  
  A coordinate system is defined by the names of the coordinates,
  (attribute ``coord_names``) and the numpy dtype of each coordinate
  value (attribute ``coord_dtype``).  The coordinate system can also
  have a name.
  
  >>> names = ['first', 'second', 'third']
  >>> cs = CoordinateSystem(names, 'a coordinate system', np.float64)
  >>> cs.coord_names
  ('first', 'second', 'third')
  >>> cs.name
  'a coordinate system'
  >>> cs.coord_dtype
  dtype('float64')
  
  The coordinate system also has a ``dtype`` which is the composite
  numpy dtype, made from the (``names``, ``coord_dtype``).
  
  >>> dtype_template = [(name, np.float64) for name in cs.coord_names]
  >>> dtype_should_be = np.dtype(dtype_template)
  >>> cs.dtype == dtype_should_be
  True
  
  Two CoordinateSystems are equal if they have the same dtype
  and the same names and the same name.
  
  >>> another_cs = CoordinateSystem(names, 'not irrelevant', np.float64)
  >>> cs == another_cs
  False
  >>> cs.dtype == another_cs.dtype
  True
  >>> cs.name == another_cs.name
  False
class_docstr_tok: ["An","ordered","sequence","of","named","coordinates","of","a","specified","dtype",".","A","coordinate","system","is","defined","by","the","names","of","the","coordinates",",","(","attribute","``","coord_names","``",")","and","the","numpy","dtype","of","each","coordinate","value","(","attribute","``","coord_dtype","``",")",".","The","coordinate","system","can","also","have","a","name",".",">",">",">","names","=","[","'first","'",",","'second","'",",","'third","'","]",">",">",">","cs","=","CoordinateSystem","(","names",",","'","a","coordinate","system","'",",","np.float64",")",">",">",">","cs.coord_names","(","'first","'",",","'second","'",",","'third","'",")",">",">",">","cs.name","'","a","coordinate","system'",">",">",">","cs.coord_dtype","dtype","(","'float64","'",")","The","coordinate","system","also","has","a","``","dtype","``","which","is","the","composite","numpy","dtype",",","made","from","the","(","``","names","``",",","``","coord_dtype","``",")",".",">",">",">","dtype_template","=","[","(","name",",","np.float64",")","for","name","in","cs.coord_names","]",">",">",">","dtype_should_be","=","np.dtype","(","dtype_template",")",">",">",">","cs.dtype","==","dtype_should_be","True","Two","CoordinateSystems","are","equal","if","they","have","the","same","dtype","and","the","same","names","and","the","same","name",".",">",">",">","another_cs","=","CoordinateSystem","(","names",",","'not","irrelevant","'",",","np.float64",")",">",">",">","cs","==","another_cs","False",">",">",">","cs.dtype","==","another_cs.dtype","True",">",">",">","cs.name","==","another_cs.name","False"]
docstr: Create a coordinate system with a given name and coordinate names.
  
  The CoordinateSystem has two dtype attributes:
  
  #. self.coord_dtype is the dtype of the individual coordinate values
  #. self.dtype is the recarray dtype for the CoordinateSystem
     which combines the coord_names and the coord_dtype.  This
     functions as the description of the CoordinateSystem.
  
  Parameters
  ----------
  coord_names : iterable
     A sequence of coordinate names.
  name : string, optional
     The name of the coordinate system
  coord_dtype : np.dtype, optional
     The dtype of the coord_names.  This should be a built-in
     numpy scalar dtype. (default is np.float64).  The value can
     by anything that can be passed to the np.dtype constructor.
     For example ``np.float64``, ``np.dtype(np.float64)`` or ``f8``
     all result in the same ``coord_dtype``.
  
  Examples
  --------
  >>> c = CoordinateSystem('ij', name='input')
  >>> print(c)
  CoordinateSystem(coord_names=('i', 'j'), name='input', coord_dtype=float64)
  >>> c.coord_dtype
  dtype('float64')
docstr_tok: ["Create","a","coordinate","system","with","a","given","name","and","coordinate","names",".","The","CoordinateSystem","has","two","dtype","attributes",":","#",".","self.coord_dtype","is","the","dtype","of","the","individual","coordinate","values","#",".","self.dtype","is","the","recarray","dtype","for","the","CoordinateSystem","which","combines","the","coord_names","and","the","coord_dtype",".","This","functions","as","the","description","of","the","CoordinateSystem",".","Parameters","--","--","--","--","--","coord_names",":","iterable","A","sequence","of","coordinate","names",".","name",":","string",",","optional","The","name","of","the","coordinate","system","coord_dtype",":","np.dtype",",","optional","The","dtype","of","the","coord_names",".","This","should","be","a","built-in","numpy","scalar","dtype",".","(","default","is","np.float64",")",".","The","value","can","by","anything","that","can","be","passed","to","the","np.dtype","constructor",".","For","example","``","np.float64","``",",","``","np.dtype","(","np.float64",")","``","or","``","f8","``","all","result","in","the","same","``","coord_dtype","``",".","Examples","--","--","--","--",">",">",">","c","=","CoordinateSystem","(","'ij","'",",","name='input","'",")",">",">",">","print","(","c",")","CoordinateSystem","(","coord_names=","(","'","i","'",",","'","j","'",")",",","name='input","'",",","coord_dtype=float64",")",">",">",">","c.coord_dtype","dtype","(","'float64","'",")"]
code: def __init__(self, coord_names, name="", coord_dtype=np.float64):
      """Create a coordinate system with a given name and coordinate names.
  
      The CoordinateSystem has two dtype attributes:
  
      #. self.coord_dtype is the dtype of the individual coordinate values
      #. self.dtype is the recarray dtype for the CoordinateSystem
         which combines the coord_names and the coord_dtype.  This
         functions as the description of the CoordinateSystem.
  
      Parameters
      ----------
      coord_names : iterable
         A sequence of coordinate names.
      name : string, optional
         The name of the coordinate system
      coord_dtype : np.dtype, optional
         The dtype of the coord_names.  This should be a built-in
         numpy scalar dtype. (default is np.float64).  The value can
         by anything that can be passed to the np.dtype constructor.
         For example ``np.float64``, ``np.dtype(np.float64)`` or ``f8``
         all result in the same ``coord_dtype``.
  
      Examples
      --------
      >>> c = CoordinateSystem('ij', name='input')
      >>> print(c)
      CoordinateSystem(coord_names=('i', 'j'), name='input', coord_dtype=float64)
      >>> c.coord_dtype
      dtype('float64')
      """
      # this allows coord_names to be an iterator and have a length
      coord_names = tuple(coord_names)
      # Make sure each coordinate is unique
      if len(set(coord_names)) != len(coord_names):
          raise ValueError("coord_names must have distinct names")
      # verify that the dtype is coord_dtype for sanity
      sctypes = (
          np.sctypes["int"]
          + np.sctypes["float"]
          + np.sctypes["complex"]
          + np.sctypes["uint"]
          + [object]
      )
      coord_dtype = np.dtype(coord_dtype)
      if coord_dtype not in sctypes:
          raise ValueError(
              f"Coordinate dtype should be one of {sctypes}"
          )
      # Set all the attributes
      self.name = name
      self.coord_names = coord_names
      self.coord_dtype = coord_dtype
      self.ndim = len(coord_names)
      self.dtype = np.dtype(
          [(name, self.coord_dtype) for name in self.coord_names]
      )
  
imports: import numpy
label_desc: Use image node_id 1 to create a new CoordinateSystem object  with example: obj = CoordinateSystem(coord_names, name, coord_dtype)