numpy.broadcast.iters#

属性

broadcast.iters#

沿着self的“组件”的迭代器元组。

返回一个numpy.flatiter对象的元组,每个“组件”一个self

另请参阅

numpy.flatiter

示例

>>> import numpy as np
>>> x = np.array([1, 2, 3])
>>> y = np.array([[4], [5], [6]])
>>> b = np.broadcast(x, y)
>>> row, col = b.iters
>>> next(row), next(col)
(1, 4)