I have 2 arrays. Call them 'A' and 'B'. The shape of array 'A' is (10,10,3), and the shape of array 'B' is (10,10).
Now, I have acquired the coordinates of certain elements of array 'B' as a list of tuples. Let's call the list 'TupleList'. I want to now make the values of all elements in array 'A' equal to 0, except for those elements present at the coordinates in 'TupleList'.
Imagine the arrays are image arrays. Where A being an RGB image has the 3rd dimension.
How can I do so?
I am having trouble doing this because of the extra 3rd dimension that array 'A' has. Otherwise, it is quite straightforward with the use of np.where(), given that I know the limited number of values that array 'B' can take.