m1 = [0,1,1,3]
m2 = [0,0,1,1]
data = [10,20,30,40]
I want to do something like this:
mask = (m1 == 1) & (m2 == 1)
data[mask] #should return 30
Note, this example results in an error
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…