Here is an example of what I would like to do: Assume Array A
A = np.array([[0, 1, 3, 5, 9],
[2, 7, 5, 1, 4]])
And Array B
B = np.array([2, 4])
I am looking for an operation that will increment the element indexed by array B in each row of array A by 1. So the result A is:
A = np.array([[0, 1, 4, 5, 9],
[2, 7, 5, 1, 5]])
The index 2 of first row is increased by 1, and the index 4 of second row is increased by 1