class_docstr: An N-dimensional iterator object to index arrays.
  
  Given the shape of an array, an `ndindex` instance iterates over
  the N-dimensional index of the array. At each iteration a tuple
  of indices is returned, the last dimension is iterated over first.
  
  Parameters
  ----------
  shape : ints, or a single tuple of ints
      The size of each dimension of the array can be passed as
      individual parameters or as the elements of a tuple.
  
  See Also
  --------
  ndenumerate, flatiter
  
  Examples
  --------
  Dimensions as individual arguments
  
  >>> for index in np.ndindex(3, 2, 1):
  ...     print(index)
  (0, 0, 0)
  (0, 1, 0)
  (1, 0, 0)
  (1, 1, 0)
  (2, 0, 0)
  (2, 1, 0)
  
  Same dimensions - but in a tuple ``(3, 2, 1)``
  
  >>> for index in np.ndindex((3, 2, 1)):
  ...     print(index)
  (0, 0, 0)
  (0, 1, 0)
  (1, 0, 0)
  (1, 1, 0)
  (2, 0, 0)
  (2, 1, 0)
class_docstr_tok: ["An","N-dimensional","iterator","object","to","index","arrays",".","Given","the","shape","of","an","array",",","an","`","ndindex","`","instance","iterates","over","the","N-dimensional","index","of","the","array",".","At","each","iteration","a","tuple","of","indices","is","returned",",","the","last","dimension","is","iterated","over","first",".","Parameters","--","--","--","--","--","shape",":","ints",",","or","a","single","tuple","of","ints","The","size","of","each","dimension","of","the","array","can","be","passed","as","individual","parameters","or","as","the","elements","of","a","tuple",".","See","Also","--","--","--","--","ndenumerate",",","flatiter","Examples","--","--","--","--","Dimensions","as","individual","arguments",">",">",">","for","index","in","np.ndindex","(","3",",","2",",","1",")",":","...","print","(","index",")","(","0",",","0",",","0",")","(","0",",","1",",","0",")","(","1",",","0",",","0",")","(","1",",","1",",","0",")","(","2",",","0",",","0",")","(","2",",","1",",","0",")","Same","dimensions","-","but","in","a","tuple","``","(","3",",","2",",","1",")","``",">",">",">","for","index","in","np.ndindex","(","(","3",",","2",",","1",")",")",":","...","print","(","index",")","(","0",",","0",",","0",")","(","0",",","1",",","0",")","(","1",",","0",",","0",")","(","1",",","1",",","0",")","(","2",",","0",",","0",")","(","2",",","1",",","0",")"]
docstr: Standard iterator method, updates the index and returns the index
  tuple.
  
  Returns
  -------
  val : tuple of ints
      Returns a tuple containing the indices of the current
      iteration.
docstr_tok: ["Standard","iterator","method",",","updates","the","index","and","returns","the","index","tuple",".","Returns","--","--","--","-","val",":","tuple","of","ints","Returns","a","tuple","containing","the","indices","of","the","current","iteration","."]
code: def __next__(self):
      """
      Standard iterator method, updates the index and returns the index
      tuple.
  
      Returns
      -------
      val : tuple of ints
          Returns a tuple containing the indices of the current
          iteration.
  
      """
      next(self._it)
      return self._it.multi_index
  
imports: import functools
  import sys
  import math
  import warnings
  import numpy
  from .._utils import set_module
  import numpy.core.numeric
  from numpy.core.numeric import ScalarType, array
  from numpy.core.numerictypes import issubdtype
  import numpy.matrixlib
  from .function_base import diff
  from numpy.core.multiarray import ravel_multi_index, unravel_index
  from numpy.core import overrides, linspace
  from numpy.lib.stride_tricks import as_strided
label_desc: Use image node_id 4 for calling the ndindex obj's underlying member method code with example usage: obj.__next__() and returns: self