I need to prune a large number of entries from a SciPy sparse matrix. Currently I convert the matrix to the DOK format and individually assign each entry to 0.
m = m.todok()
for i, j in pruneme:
m[i,j] = 0
This is extremely slow.
Is there a faster way?