I have a sparse csr_matrix, and I want to change the values of a single row to different values. I can\'t find an easy and efficient implementation however. This is what it
This is my approach:
A = A.tolil() A[index, :] = new_row A = A.tocsr()
Just convert to lil_matrix, change the row and convert back.
lil_matrix