NumPy

numpy.nditer.multi_index

attribute

nditer.multi_index