NumPy

numpy.nditer.has_index

attribute

nditer.has_index