I have two arrays of the same size:
import numpy as np
myArray = np.array([[5,3,2,1,2],
[2,5,3,3,3]])
myotherArray = np.array([[0,1,1,0,0],
[0,0,1,0,0]])
I like to multiple all values in myArray by 5, but only if on the same index in myotherArray a value of 0 is. How do I do this?
I tried this, but it doesn't do anything.
myArray[myotherArray == 0]*5
My expected output is for myArray
([[25,3,2,5,10],
[10,25,3,15,15]])