I want to subtract a column vector from a numpy matrix using another vector which is index of columns where the first column vector needs to be subtracted from the main mat
We can use np.subtract.at on transposed view of M -
M
np.subtract.at(M.T,I,V)