SciPy coordinating issue for deprecation of spmatrix in favor of sparray
The project to move from the sparse matrix API to the sparse array API
is ready for its next step. The sparray feature set has been
complete and stable since v1.15. Most features were implemented
well before that, as early as v1.8. The migration guide has
been available since v1.15. We have helped a number of libraries
make the conversion to using sparray, including networkx, sksparse, dipy, scikit-image, cvxpy, pyamg, many pysal libraries, scikit-learn.
This forum post is a step in the deprecation process. Please provide feedback.
Plan for a general order of changes:
- docstrings warnings and deemphasizing spmatrix
- deprecation warnings and adapt tests to filter warnings
- removal of spmatrix
More details are included in a “tracking issue” for the process. Issue 24802
Doc warnings will happen first – with suggested replacements for the spmatrix classes, some utility functions and the construction functions (like eye) which return spmatrix only.
We will separate the spmatrix api description from the central sparse landing page with a link to it from the main page. Pointers to spmatrix-only functions will move to this page, hopefully making it clear that these are Lagacy Features.
We hope to have these doc changes in place for v1.18.
We will have a draft PR for adding the deprecation warnings soon. This allows us to track what parts of the library are affected by spmatrix and where attention is needed. That will be updated to prepare for deprecation, and also to track new code additions that use spmatrix. The goal is to have everyone comfortable with deprecation warnings in 1.19. The warnings would state that removal will not occur before 1.21.
Removal in 1.21 with normal release cadence would be Jan 2028. This can change of course.
Please leave feedback here or in the issue