Can I create a new array by comparing arrays with numpy?
I have 3 arrays (A1, A2, A3).
How can I find all indexes where A1 == 2 and A2 > A3 and write there the value 5 in a new array?
I have this matlab code which is doing this:
index = find(A1==2 & A2>A3);
new_array(index) = 5;
I found putmask and logical_and but not sure if this are the right tools and how do use it in my case. Thanks!