I'm trying to increment values in a numpy array multiple times. For example I would like to do:
input = np.array([[1,1],[2,2]])
input[[0,0,0],[1,0,1]] += [4,1,6]
and get output:
array([[2, 11],
[2, 2]])
However, numpy gives
array([[2, 7],
[2, 2]])
Is there a way to increment the same index multiple times?