Sparse matrix creation routines treat zeros differently. Unify behavior?
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
I noticed that `CooMatrix::push_matrix` does not threshold or detect zero elements in the input. Thus the resulting sparse matrix is more dense than it needs to be. By comparison, constructing a matrix using, e.g., `CscMatrix::from`, does detect entries that are exactly zero and does not include them in the resulting sparse matrix. If there isn't a rationale for the difference in behavior, may I suggest to make all construction methods detect and discard zero entries? This would incur overhead during construction but could speed up subsequent (particularly repeated) computations performed with the resulting sparse matrix. What are your thoughts on this?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.