SciPy

numpy.nditer.index

attribute

nditer.index