Foggalong / RobustOCS

Robust optimal contirbution selection problems for genetics with Python
https://pypi.org/project/robustocs
MIT License
1 stars 0 forks source link

Adopt SciPy sparse array classes #21

Closed Foggalong closed 1 month ago

Foggalong commented 1 month ago

I wrote the sparse matrix code naively using SciPy's sparse matrix classes as I've done before. It turns out SciPy are switching to an array interface, more compatible with NumPy and hopefully faster too. Looking at the documentation, this shouldn't require much change beyond specifying how variables are defined. Most of the user-facing changes are to sparse operations which isn't something we use SciPy for.

Foggalong commented 1 month ago

While we've addressed some of the underlying intention here (namely making better use of NumPy and SciPy's typing), the main point of moving from spmatrix to sparray is held indefinitely until the class reaches performance parity. Looking around at what I can find on the issue, the transition has been in progress since 2021 but there's no timeline for deprecation. There's also still no warning about using spmatrix beyond the docs recommending sparray for new work.