numpy.nditer.copy

原文:https://docs.scipy.org/doc/numpy/reference/generated/numpy.nditer.copy.html

译者:飞龙 UsyiyiCN

校对:(虚位以待)

nditer.copy()

获取迭代器的当前状态的副本。

例子

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