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","."]
code: def _index_to_arrays(self, i, j):
      i, j = self._check_boolean(i, j)
  
      i_slice = isinstance(i, slice)
      if i_slice:
          i = self._slicetoarange(i, self.shape[0])[:, None]
      else:
          i = np.atleast_1d(i)
  
      if isinstance(j, slice):
          j = self._slicetoarange(j, self.shape[1])[None, :]
          if i.ndim == 1:
              i = i[:, None]
          elif not i_slice:
              raise IndexError("index returns 3-dim structure")
      elif isscalarlike(j):
          # row vector special case
          j = np.atleast_1d(j)
          if i.ndim == 1:
              i, j = _broadcast_arrays(i, j)
              i = i[:, None]
              j = j[:, None]
              return i, j
      else:
          j = np.atleast_1d(j)
          if i_slice and j.ndim > 1:
              raise IndexError("index returns 3-dim structure")
  
      i, j = _broadcast_arrays(i, j)
  
      if i.ndim == 1:
          # return column vectors for 1-D indexing
          i = i[None, :]
          j = j[None, :]
      elif i.ndim > 2:
          raise IndexError("Index dimension must be <= 2")
  
      return i, j
  
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 6 for calling the IndexMixin obj's underlying member method code with example usage: obj._index_to_arrays(i, j) and returns: i,  j, i,  j