I have a 2D array A:
28 39 52
77 80 66
7 18 24
9 97 68
And a vector array of column indexes B:
1
0
2
0
How in a pythonian way, using base python or numpy, can I replace with zeros, elements on each row of A that correspond to the column indexes in B?
I should get the following new array A, with one element on each row (the one in the column index stored in B), replaced with zero:
28 0 52
0 80 66
7 18 0
0 97 68
Thanks for your help!
Bis missing