A = np.arange(3).reshape(3,1)
A = A + 2;
B = np.arange(3).reshape(1,3)
C = [A,B,None]
print(C)
it = np.nditer(C)
print(A)
print(B)
for x,y,z in it:
print("====xy====")
xy = x + y
print(xy)
print("========")
z[...] = xy
print(z)
print(it.operands[0])
print(it.operands[2])
[array([[2],
[3],
[4]]), array([[0, 1, 2]]), None]
[[2]
[3]
[4]]
[[0 1 2]]
====xy====
2
========
====xy====
3
========
====xy====
4
========
====xy====
3
========
====xy====
4
========
====xy====
5
========
====xy====
4
========
====xy====
5
========
====xy====
6
========
6
[[2]
[3]
[4]]
[[2 3 4]
[3 4 5]
[4 5 6]]