class_docstr: This class simply exists to hold the methods necessary for fancy indexing.
class_docstr_tok: ["This","class","simply","exists","to","hold","the","methods","necessary","for","fancy","indexing","."]
docstr: Process indices with Ellipsis. Returns modified index.
docstr_tok: ["Process","indices","with","Ellipsis",".","Returns","modified","index","."]
code: def _check_ellipsis(self, index):
      """Process indices with Ellipsis. Returns modified index."""
      if index is Ellipsis:
          return (slice(None), slice(None))
      elif isinstance(index, tuple):
          # Find first ellipsis
          for j, v in enumerate(index):
              if v is Ellipsis:
                  first_ellipsis = j
                  break
          else:
              first_ellipsis = None
  
          # Expand the first one
          if first_ellipsis is not None:
              # Shortcuts
              if len(index) == 1:
                  return (slice(None), slice(None))
              elif len(index) == 2:
                  if first_ellipsis == 0:
                      if index[1] is Ellipsis:
                          return (slice(None), slice(None))
                      else:
                          return (slice(None), index[1])
                  else:
                      return (index[0], slice(None))
  
              # General case
              tail = ()
              for v in index[first_ellipsis + 1 :]:
                  if v is not Ellipsis:
                      tail = tail + (v,)
              nd = first_ellipsis + len(tail)
              nslice = max(0, 2 - nd)
              return (
                  index[:first_ellipsis]
                  + (slice(None),) * nslice
                  + tail
              )
  
      return index
  
imports: from __future__ import division, print_function, absolute_import
  import operator
  import warnings
  import numpy
  from scipy._lib._version import NumpyVersion
label_desc: Use image node_id 3 for calling the IndexMixin obj's underlying member method code with example usage: obj._check_ellipsis(index) and returns: index, slice,  slice, unknown, slice,  slice, index,  slice, slice,  slice, slice,  index