这个几行代码怎么理解

完整代码

import numpy as np
a = np.array([[1], [2], [3]])
b = np.array([4, 5, 6]) 
# 对b广播a
d = np.broadcast(a,b) 
#d它拥有 iterator 属性
r,c = d.iters
print (next(r), next(c))
print (next(r), next(c))
# 使用broadcast将a与b相加
e = np.broadcast(a,b)
f=np.empty(e.shape)
f.flat=[x+y for (x,y) in e]
print(f)
print(a+b)

不理解代码

r,c = d.iters
print (next(r), next(c))
print (next(r), next(c))

多加几行看看效果 , 应该就是对 d 生成可迭代对象, 然后用next进行遍历

import numpy as np

a = np.array([[1], [2], [3]])
b = np.array([4, 5, 6])
# 对b广播a
d = np.broadcast(a, b)
# d它拥有 iterator 属性
r, c = d.iters

print(next(r), next(c))
print(next(r), next(c))
print(next(r), next(c))
print(next(r), next(c))
print(next(r), next(c))