numpy.broadcast.iters

属性

broadcast.iters

迭代器的元组 self “S”组件。

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

实例

>>> 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)