numpy.broadcast.iters#
屬性
- broadcast.iters#
沿著
self
的 “組件” 的迭代器元組。返回
numpy.flatiter
物件的元組,self
的每個 “組件” 各一個。範例
>>> 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)