+2 votes
in Programming Languages by (75.9k 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

+1 vote
by (353k points)
selected by
Best answer
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