I have 2 numpy arrays with the same shape. Now I want to copy all values, except 0, from array 2 to array 1.
array 1:
[1, 1, 1]
[1, 1, 1]
[1, 1, 1]
array 2:
[0, 2, 0]
[4, 0, 0]
[6, 6, 0]
The result should now look like this:
[1, 2, 1]
[4, 1, 1]
[6, 6, 1]
How is this possible in Python?