numpy / 1.13.0 / generated / numpy.flatiter.coords.html /

numpy.flatiter.coords

flatiter.coords

An N-dimensional tuple of current coordinates.

Examples

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

© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.flatiter.coords.html