Skip to content

Commit 7e7216c

Browse files
authored
update sparse portions of scipy roadmap and details roadmap (scipy#22535)
[docs only]
1 parent 689ebb9 commit 7e7216c

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

doc/source/dev/roadmap-detailed.rst

+13-9
Original file line numberDiff line numberDiff line change
@@ -349,20 +349,24 @@ some point).
349349

350350
What we want is sparse arrays that act like ``numpy.ndarray``. Initial
351351
support for a new set of classes (``csr_array`` et al.) was added in SciPy
352-
``1.8.0`` and stabilized in ``1.12.0`` when construction functions for
353-
arrays were added. Support for 1-D array is expected in ``1.13.0``.
352+
``1.8.0`` and stabilized in ``1.12.0`` with construction functions for
353+
arrays, ``1.14.0`` with 1D array support and ``1.15.0`` with 1D indexing.
354+
The sparse array codebase now supports all sparse matrix features and in
355+
addition supports 1D arrays and the first steps toward nD arrays.
356+
There is a transition guide to help users and libraries convert their code
357+
to sparse arrays.
354358

355-
Next steps toward sparse array support:
359+
Next steps toward sparse array conversion:
356360

357-
- Extend sparse array API to 1-D arrays.
361+
- Extend sparse array API to nD arrays.
358362
- Support for COO, CSR and DOK formats.
359-
- CSR 1D support for min-max, indexing, arithmetic.
363+
- Some COO features exist in 1.15.
364+
- Introduce support for broadcasting in operations where sparse formats
365+
can effectively do that.
360366
- Help other libraries convert to sparse arrays from sparse matrices.
361-
Create transition guide and helpful scripts to flag code that needs
362-
further examination. NetworkX, scikit-learn and scikit-image are in
367+
NetworkX, dipy, scikit-image, pyamg, cvxpy and scikit-learn are in
363368
progress or have completed conversion to sparse arrays.
364-
- After sparse array code is mature (~1 release cycle?) add deprecation
365-
warnings for sparse matrix.
369+
- Add deprecation warnings for sparse matrix.
366370
- Work with NumPy on deprecation/removal of ``numpy.matrix``.
367371
- Deprecate and then remove sparse matrix in favor of sparse array.
368372
- Start API shift of construction function names (``diags``, ``block``, etc.)

doc/source/dev/roadmap.rst

+16-9
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,25 @@ possible then. Finally, resolving open AIX build issues would help users.
6363
Implement sparse arrays in addition to sparse matrices
6464
------------------------------------------------------
6565

66-
The sparse matrix formats are mostly feature-complete, however the main issue
66+
SciPy sparse matrices are being replaced by sparse arrays.
67+
The sparse matrix formats are mostly feature-complete, however their main issue
6768
is that they act like ``numpy.matrix`` (which will be deprecated in NumPy at
6869
some point). What we want is sparse *arrays* that act like ``numpy.ndarray``
6970
(See discussion at `gh-18915 <https://github.com/scipy/scipy/issues/18915>`_).
70-
Sparse arrays have largely been implemented in ``scipy.sparse`` at this time.
71-
Some functionality is still being completed. The future plan is:
72-
73-
- Provide a feature-complete sparse array API (including 1D-array).
74-
- Extend sparse array API to 1D arrays:
75-
- COO, CSR and DOK formats.
76-
- The CSR 1D format uses 2D CSR code to do 1D things like
77-
indexing/min-max/arithmetic.
71+
Sparse arrays support all features of sparse matrices as of 1.15.
72+
In addition to 2D arrays, 1D sparse arrays are supported in DOK, COO, CSR formats.
73+
Further functionality e.g. nD array support and broadcasting for some operations
74+
is being developed. The future plan is:
75+
76+
- Extend sparse array API to nD arrays:
77+
- COO, CSR and DOK formats. COO format already partially in place.
78+
- The nD formats use 2D CSR code to do nD things like
79+
indexing/min-max/arithmetic.
80+
- Sparse array binary operations will support broadcasting in some settings.
81+
Broadcasting is tricky for sparse arrays because it leans heavily on the strided
82+
memory model of dense arrays, and so does not always fit sparse data formats.
83+
Our optimistic goal is to support broadcasting for all operations where that
84+
makes sense for sparse data structures. We start with binary operations like `A + B`.
7885
- Help other libraries convert to sparse arrays from sparse matrices.
7986
Create transition guide and helpful scripts to flag code that needs changing.
8087
- Deprecate and then remove "sparse matrix" in favor of "sparse array".

0 commit comments

Comments
 (0)