W3cubDocs

/NumPy 1.17

numpy.nditer.copy

method

nditer.copy()

Get a copy of the iterator in its current state.

Examples

>>> x = np.arange(10)
>>> y = x + 1
>>> it = np.nditer([x, y])
>>> next(it)
(array(0), array(1))
>>> it2 = it.copy()
>>> next(it2)
(array(1), array(2))

© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.nditer.copy.html