I want to divide a sparse matrix\'s rows by scalars given in an array.
For example, I have a csr_matrix C :
csr_matrix
C
C = [[2,4,6], [5,
If you first cast D to type numpy.matrix (which I'm assuming you can do unless D is too big to fit into memory), then you can just run
D
numpy.matrix
C.multiply(1.0 / D.T)
to get what you want.