sarah-ek / faer-rs

Linear algebra foundation for the Rust programming language
https://faer-rs.github.io
MIT License
1.82k stars 61 forks source link

Support for loading from NPZ files that is used for scipy sparse matrices #130

Open ThomAub opened 5 months ago

ThomAub commented 5 months ago

Is your feature request related to a problem? Please describe. Using the io module it's possible to load a Mat from an NPY file. However it's not possible to easily load a scipy sparse matrice

Describe the solution you'd like I would like to also load from NPYZ for SparseColMat and SparseRowMat

Describe alternatives you've considered I started to implement this on my side but i could upstream this work here if it's ok to use the feature npz from npyz

A note from the npyz readme

adding a public dependency on the zip crate. This requires opt-in because zip has a fair number of transitive dependencies. (note >that some npz-related helper functions are available even without the feature)