class_docstr: Class combining coordinate map and array shape
  
  When the function_domain of a CoordinateMap can be thought of as
  'array' coordinates, i.e. an 'input_shape' makes sense. We can
  than evaluate the CoordinateMap at np.indices(input_shape)
docstr: Return a slice through the coordmap.
  
  Parameters
  ----------
  slicers : int or tuple
     int, or sequence of any combination of integers, slices.  The
     sequence can also contain one Ellipsis.
docstr_tok: ["Return","a","slice","through","the","coordmap",".","Parameters","--","--","--","--","--","slicers",":","int","or","tuple","int",",","or","sequence","of","any","combination","of","integers",",","slices",".","The","sequence","can","also","contain","one","Ellipsis","."]
code: def __getitem__(self, slicers):
      """
      Return a slice through the coordmap.
  
      Parameters
      ----------
      slicers : int or tuple
         int, or sequence of any combination of integers, slices.  The
         sequence can also contain one Ellipsis.
      """
      # slicers might just be just one thing, so convert to tuple
      if type(slicers) != type(()):
          slicers = (slicers,)
      # raise error for anything other than slice, int, Ellipsis
      have_ellipsis = False  # check for >1 Ellipsis
      for i in slicers:
          if isinstance(i, np.ndarray):
              raise ValueError(
                  "Sorry, we do not support "
                  "ndarrays (fancy indexing)"
              )
          if i == Ellipsis:
              if have_ellipsis:
                  raise ValueError(
                      "only one Ellipsis (...) allowed in slice"
                  )
              have_ellipsis = True
              continue
          try:
              int(i)
          except TypeError:
              if hasattr(i, "start"):  # probably slice
                  continue
              raise ValueError("Expecting int, slice or Ellipsis")
      # allow slicing of form [...,1]
      if have_ellipsis:
          # convert ellipsis to series of slice(None) objects.  For
          # example, if the coordmap is length 3, we convert (...,1)
          # to (slice(None), slice(None), 1) - equivalent to [:,:,1]
          ellipsis_start = list(slicers).index(Ellipsis)
          inds_after_ellipsis = slicers[(ellipsis_start + 1) :]
          # the ellipsis continues until any remaining slice specification
          n_ellipses = (
              len(self.shape)
              - ellipsis_start
              - len(inds_after_ellipsis)
          )
          slicers = (
              slicers[:ellipsis_start]
              + n_ellipses * (slice(None),)
              + inds_after_ellipsis
          )
      return _slice(self.coordmap, self.shape, *slicers)
  
file_path: nipy/nipy/core/reference/array_coords.py
imports: import numpy
  from .coordinate_map import AffineTransform, CoordinateMap, compose, shifted_range_origin
  from .coordinate_map import product
  from .coordinate_system import CoordinateSystem
label_desc: Use image node_id 5 for calling the ArrayCoordMap obj's underlying member method code with example usage: obj.__getitem__(slicers) and returns: _slice