NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4082 most downloaded on PyPI
Sparse n-dimensional arrays for the PyData ecosystem
Last release 1 months ago
14 Aug 2026
Release timing varies
gaps range from 1 weeks to 9 months
Most releases are documented
notes for 23 of 32 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
46 releases · first in 2017
fix: don't let NaN fill_value poison reductions of fully-populated slices
Thank you to all our contributors for making this release possible! @patnr, @pre-commit-ci[bot] and pre-commit-ci[bot]
fix: avoid narrow-dtype overflow in reduceat group offsets
Thank you to all our contributors for making this release possible! @patnr, @pre-commit-ci[bot] and pre-commit-ci[bot]
One column per quarter.
fix: return 0-D array for full reductions per Array API standard by @Abineshabee in https://github.com/pydata/sparse/pull/932
array-api-tests to v2025.12 by @prady0t in https://github.com/pydata/sparse/pull/942Full Changelog: https://github.com/pydata/sparse/compare/0.18.0...0.19.0
array-api-tests to v2025.12 by @prady0t in #942Full Changelog: 0.18.0...0.19.0
Implementing repeat function by @prady0t in #875
repeat function by @prady0t in #875tile function by @prady0t in #880boolean indexing flag to False by @prady0t in #884unstack function by @prady0t in #883check_zero_fill_value by @prady0t in #886diff function by @prady0t in #888SparseArray input by @lucascolley in #918Full Changelog: 0.17.0...0.18.0
repeat function by @prady0t in https://github.com/pydata/sparse/pull/875tile function by @prady0t in https://github.com/pydata/sparse/pull/880boolean indexing flag to False by @prady0t in https://github.com/pydata/sparse/pull/884unstack function by @prady0t in https://github.com/pydata/sparse/pull/883check_zero_fill_value by @prady0t in https://github.com/pydata/sparse/pull/886diff function by @prady0t in https://github.com/pydata/sparse/pull/888SparseArray input by @lucascolley in https://github.com/pydata/sparse/pull/918Full Changelog: https://github.com/pydata/sparse/compare/0.17.0...0.18.0
[pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #859
scipy.sparse arrays by @hameerabbasi in #861check_zero_fill_value and equivalent by @hameerabbasi in #870finch-tensor version by @mtsokol in #872Full Changelog: 0.16.0...0.17.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix misfire of DeprecationWarning.
sparse_finch notebook and upgrade finch-tensor (#820)reshape function (#776)test_where test (#707)sparse import refactor (#695)scipy.sparse fill-value fix. (#685)finch-tensor (#684)scipy.sparse.csgraph and scipy.sparse.linalg (#683)SpMV example (#677)MTTKRP example (#676)SDDMM example (#674)finch-tensor dep (#666)PyData backend to Numba (#665)scipy.sparse (#664)finch-tensor version (#662)asarray function (#658)backend kwarg from asarray. (#655)finch_backend (#649)pydata_backend (#646)np.intp for indices. (#634)kwargs to sparse.einsum (#620)sparse.asarray (#615)argmax and argmin (#614)squeeze method to COO (#613)__str__ and _repr_html_ (#605)_sparse_array.SparseArray (#597)benchmark_matmul.py (#484)copy=False in astype (#328)coords (#296)COO.reshape (#193)releases sphinx extension (#188)Array.asformat method and add back reshape function. (#800)sparse_vector constructor (#791)broadcast_to function (#782)reshape (#784)finch-tensor (#702)matmul example (#701)finch-tensor (#694)finch-tensor (#693)array_api_tests CI job (#668)sort and take functions for COO format (#627)expand_dims and flip functions for COO format (#629)finch-tensor (#700)finch-tensor (#687)sparse.max docstring (#730)COO.mT (#722)pixi environment setup (#780)19.1.0.rc3 (#765)codspeed (#741)md to yml (#737)Thank you to all our contributors for making this release possible! @Carreau, @DavidMertz, @DeaMariaLeon, @DragaDoncila, @EuGig, @GenevieveBuckley, @H4R5H1T-007, @HadrienNU, @Illviljan, @KanzaSheikh, @MHRasmy, @ShadenSmith, @SultanOrazbayev, @ahwillia, @alugowski, @argearriojas, @asmeurer, @bnavigator, @crusaderky, @daissi, @daletovar, @danielballan, @delgadom, @dependabot, @dependabot[bot], @emilmelnikov, @eric-wieser, @fujiisoup, @gforsyth, @ghisvail, @gongliyu, @graingert, @guilhermeleobas, @hameerabbasi, @hugovk, @ivirshup, @jakevdp, @jamestwebber, @jcapriot, @jcmgray, @jcrist, @lgtm-com, @lgtm-com[bot], @lueckem, @mangecoeur, @mikeymezher, @mrocklin, @mtsokol, @nils-werner, @nimroha, @nvictus, @pentschev, @pettni, @pre-commit-ci, @pre-commit-ci[bot], @sarveshbhatnagar, @sayandip18, @simonthor, @smldub, @stsievert, @willow-ahrens, David Mertz and Petter Nilsson
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix regression where with XArray by supporting all API functions via the Array API standard. (PR #622 thanks @hameerabbasi)
Fix regression where [DeprecationWarning][]s were being fired unexpectedly. (PR #581 thanks @hameerabbasi)
DeprecationWarning][]s were being fired unexpectedly. (PR #581 thanks @hameerabbasi)sparse.einsum][] support (PR #579 thanks @HadrienNU)Array API standard <https://data-apis.org/array-api/latest/>_ support (PR #612, PR #613, PR #614, PR #615, PR #619, PR #620 thanks @mtsokol)matrepr support for display of sparse data (PR #605, PR #606 thanks @alugowski).b5954e68d3d6e35a62f7401d1d4fb84ea04414dd, :commit:dda93d3ea9521881c721c3ba875c769c9c5a79d4 thanks @hameerabbasi)[sparse.einsum][] support (PR #564 thanks @jcmgray)
sparse.einsum][] support (PR #564 thanks
@jcmgray)[sparse.GCXS][] improvements and changes. (PR #448, PR #450, PR #455, thanks @sayandip18).
sparse.GCXS][] improvements and changes. (PR #448, PR #450, PR #455, thanks
@sayandip18).1ccb85da581be65a0345b399e00fd3c325700d95,
:commit:5547b4e92dc8d61492e9dc10ba00175c1a6637fa
:commit:00c0e5514de2aab8b9a0be16b5da470b091d9eb9, :commit:fcd3020dd08c7022a44f709173fe23969d3e8f7c,
thanks @hameerabbasi)sparse.DOK.from_scipy_sparse][] method (PR #464, Issue #463, thanks
@hameerabbasi).sparse.pad][] (PR #474, Issue #438, thanks @H4R5H1T-007)5547b4e92dc8d61492e9dc10ba00175c1a6637fa..a332f22c96a96e5ab9b4384342df67e8f3966f85)sparse.matmul][] for higher-dimensional arrays. (PR #508,
Issue #506, thanks @sayandip18).1e24a7e29786e888dee4c02153309986ae4b5dde
thanks @hameerabbasi)5211441ec685233657ab7156f99eb67e660cee86,
thanks @hameerabbasi)nnz==0. (Issue #513, :commit:bfabaa0805e811884e79c4bdbfd14316986d65e4,
thanks @hameerabbasi){zero, ones, full}[_like]. (Issue #514, :commit:37de1d0141c4375962ecdf18337c2dd0f667b60c,
thanks @hameerabbasi)37de1d0141c4375962ecdf18337c2dd0f667b60c,
thanks @hameerabbasi).There are a number of large changes in this release. For example, we have implemented the [sparse.GCXS][] type, and its specializations CSR and CSC. W
There are a number of large changes in this release. For example, we have implemented the
[sparse.GCXS][] type, and its specializations CSR and CSC. We plan on gradually improving
the performance of these.
sparse.GCXS][] fixes and additions (PR #409, PR #407, PR #414,
PR #417, PR #419 thanks @daletovar)sparse.DOK][] arrays to bring them closer to the other formats (PR #435,
PR #437, PR #439, PR #440, thanks @DragaDoncila)CSR and CSC specializations of [sparse.GCXS][] (PR #442, thanks @ivirshup)
For now, this is experimental undocumented API, and subject to change.nnz parameter to [sparse.random][] (PR #410, thanks @emilmelnikov)Fix TypingError on [sparse.dot][] with complex dtypes. (Issue #403, PR #404)
Fix [ValueError][] on [sparse.dot][] with extremely small values. (Issue #398, PR #399)
Improve the performance of [sparse.dot][]. (Issue #331, PR #389, thanks @daletovar)
sparse.dot][]. (Issue #331, PR #389, thanks @daletovar)sparse.COO.swapaxes][] method. (PR #344, thanks @lueckem)outer for arrays that weren't one-dimensional. (Issue #346, PR #347)casting kwarg to [sparse.COO.astype][]. (Issue #391, PR #392)sparse.COO][] constructor accepting invalid inputs. (Issue #385, PR #386)Fixed a bug where converting an empty DOK array to COO leads to an incorrect dtype. (Issue #314, PR #315)
sparse.COO.flatten] and outer. (Issue #316, PR #317).copy=False in astype (PR #328, thanks @eric-wieser).ndim==0 (Issue #332,
PR #333, thanks @guilhermeleobas).Fixed a bug where indexing with an empty list could lead to issues. (Issue #281, PR #282)
sparse.diagonal][] and [sparse.diagonalize][] functions.
(Issue #288, PR #289, thanks @pettni)coords when making a new [sparse.COO][]
array.__array_function__. (Issue #308, PR #309).sparse.COO][] objects to
Numba.This release switches to Numba's new typed lists, a lot of back-end work with the CI infrastructure, so Linux, macOS and Windows are officially tested
This release switches to Numba's new typed lists, a lot of back-end work with the CI infrastructure, so Linux, macOS and Windows are officially tested. It also includes bug fixes.
It also adds in-progress, not yet public support for the GCXS format, which is a generalisation of CSR/CSC. (huge thanks to @daletovar)
std and var. (PR #244)resize, and change reshape so it raises a
ValueError on shapes that don't correspond to the
same size. (Issue #241, Issue #250, PR #256
thanks, @daletovar)isposinf and isneginf. (Issue #252, PR #253)tensordot when nnz = 0. (Issue #255, PR #256)__array_function__ to allow for sparse
XArrays. (PR #261, thanks @nvictus)__array_function__. (PR #267, PR #272, thanks
@crusaderky)This is a release that adds compatibility with NumPy's new __array_function__ protocol, for details refer to NEP-18 _.
This is a release that adds compatibility with NumPy's new
__array_function__ protocol, for details refer to
NEP-18 <http://www.numpy.org/neps/nep-0018-array-function-protocol.html#coercion-to-a-numpy-array-as-a-catch-all-fallback>_.
The other big change is that we dropped compatibility with Python 2. Users on Python 2 should use version 0.6.0.
There are also some bug-fixes relating to fill-values.
This was mainly a contributor-driven release.
The full list of changes can be found below:
sparse.DOK][] and
[sparse.COO][] caused fill-values to be lost.
(Issue #225, PR #226).__array_function__ support. (PR #239, thanks, @pentschev)This release breaks backward-compatibility. Previously, if arrays were fed into NumPy functions, an attempt would be made to densify the array and app
This release breaks backward-compatibility. Previously, if arrays were fed into
NumPy functions, an attempt would be made to densify the array and apply the NumPy
function. This was unintended behaviour in most cases, with the array filling up
memory before raising a MemoryError if the array was too large.
We have now changed this behaviour so that a RuntimeError is now raised if
an attempt is made to automatically densify an array. To densify, use the explicit
.todense() method.
np.matrix could sometimes fail to
convert to a COO. (Issue #199, PR #200).sparse @ sparse returns a sparse array. (Issue #201, PR #203)operator.matmul behaviour in line with NumPy for ndim > 2.
(Issue #202, PR #204, PR #217)dtype is preserved with the out kwarg. (Issue #205, PR #206)reduce on Windows. (Issue #207, PR #208)Added COO.real, COO.imag, and COO.conj (PR #196).
COO.real, COO.imag, and COO.conj (PR #196).sparse.kron function (PR #194, PR #195).order parameter to COO.reshape to make it work with
np.reshape (PR #193).COO.mean and sparse.nanmean (PR #190).sparse.full and sparse.full_like (PR #189).COO.clip method (PR #185).COO.copy method, and changed pickle of COO to not
include its cache (PR #184).sparse.eye, sparse.zeros, sparse.zeros_like,
sparse.ones, and sparse.ones_like (PR #183).Allow mixed ndarray-COO operations if the result is sparse (Issue #124, via PR #182).
ndarray-COO operations if the result is sparse
(Issue #124, via PR #182).COO.any and COO.all methods (PR #175).COO now accepts a single one-dimensional array index
(PR #172).False
(PR #165).sparse.roll function (PR #160).COO.coords.dtype is
always np.int64. COO, therefore, uses more memory than
before (PR #158).COO files from disk (Issue #153,
via PR #154).COO.nonzero and np.argwhere (Issue #145, via
PR #148).COO is now always canonical (PR #141).ufunc.reduce from NumPy (Issue #107, via
PR #108).Nothing published for this version
* Fix packaging error (PR #138).
Add NaN-skipping aggregations (PR #102).
np.where (PR #102).dot more consistent with NumPy (PR #96).SparseArray (PR #92).DOK element to zero did nothing
(Issue #93, via PR #94).Support faster np.array(COO) (PR #87).
np.array(COO) (PR #87).DOK type (PR #85)..size and .density (PR #69).len(COO) now works (PR #68).scalar op COO now works for all operators (PR #67)..transpose() (PR #61).random function for generating random sparse arrays (PR #41).COO(COO) now copies the original object (PR #55).COO arrays
(PR #49).nnz for scalars (Issue #47, via PR #48).triu and tril (PR #40)....) and None when indexing
(PR #37).& and |
(PR #38).Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →