+2 votes
in Programming Languages by (17.0k points)

I am trying to change the values in a column of a CSR matrix, but I am getting the following message:

SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil_matrix is more efficient.

However, the program does not abort and it gives the desired results.

1 Answer

0 votes
by (29.1k points)
This is a warning message. You can ingone it.

You can check this URL for the details of lil_matrix https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.lil_matrix.html