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
  ----------
  `*args` : ints
    The size of each dimension of the array.
  
  See Also
  --------
  ndenumerate, flatiter
  
  Examples
  --------
  >>> 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","--","--","--","--","--","`","*","args","`",":","ints","The","size","of","each","dimension","of","the","array",".","See","Also","--","--","--","--","ndenumerate",",","flatiter","Examples","--","--","--","--",">",">",">","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",")"]
code: def __init__(self, *shape):
      if len(shape) == 1 and isinstance(shape[0], tuple):
          shape = shape[0]
      x = as_strided(
          _nx.zeros(1), shape=shape, strides=_nx.zeros_like(shape)
      )
      self._it = _nx.nditer(
          x, flags=["multi_index", "zerosize_ok"], order="C"
      )
  
imports: from __future__ import division, absolute_import, print_function
  import functools
  import sys
  import math
  import numpy.core.numeric
  from numpy.core.numeric import asarray, ScalarType, array, alltrue, cumprod, arange, ndim
  from numpy.core.numerictypes import find_common_type, issubdtype
  import numpy.matrixlib
  from .function_base import diff
  from numpy.core.multiarray import ravel_multi_index, unravel_index
  from numpy.core.overrides import set_module
  from numpy.core import overrides, linspace
  from numpy.lib.stride_tricks import as_strided
label_desc: Use image node_id 1 to create a new ndindex object from inherited base classes: object with example: obj = ndindex()