numpy / 1.22.0 / reference / generated / numpy.flatiter.index.html /

numpy.flatiter.index

attribute

flatiter. index

Current flat index into the array.

Examples

>>> x = np.arange(6).reshape(2, 3)
>>> fl = x.flat
>>> fl.index
0
>>> next(fl)
0
>>> fl.index
1

© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.22/reference/generated/numpy.flatiter.index.html