Changelog
0.15.1 / 2024-01-10
- Fix regression where with XArray by supporting all API functions via the Array API standard. (PR #622 thanks @hameerabbasi)
0.15.0 / 2024-01-09
- Fix regression where
DeprecationWarning
s were being fired unexpectedly. (PR #581 thanks @hameerabbasi) - Extended
sparse.einsum
support (PR #579 thanks @HadrienNU) - General code clean-up (PR #586 thanks @MHRasmy, PR #598 thanks @jamestwebber)
- Bug fixes with respect to NumPy compatibility (PR #598 thanks @hameerabbasi, PR #609 thanks @Illviljan, PR #620 thanks @mtsokol)
- Bug fixes with respect to GCXS (PR #611 thanks @EuGig, PR #601 thanks @jamestwebber)
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).- Larger code clean-up with Ruff formatter and linter (PR #617, PR #621 thanks @hameerabbasi)
- Packaging and maintenance (PR #616, :commit:
b5954e68d3d6e35a62f7401d1d4fb84ea04414dd
, :commit:dda93d3ea9521881c721c3ba875c769c9c5a79d4
thanks @hameerabbasi)
0.14.0 / 2023-02-24
sparse.einsum
support (PR #564 thanks @jcmgray)- Some bug-fixes (PR #524, PR #527, PR #555 thanks @hameerabbasi, PR #569, thanks @jamestwebber, PR #534, thanks @sarveshbhatnagar)
- Some performance improvements (PR #570, thanks @jamestwebber, PR #540, thanks @smldub).
- Miscellaneous maintenance fixes.
0.13.0 / 2021-08-28
sparse.GCXS
improvements and changes. (PR #448, PR #450, PR #455, thanks @sayandip18).- Maintainence fixes (PR #462, PR #466, :commit:
1ccb85da581be65a0345b399e00fd3c325700d95
, :commit:5547b4e92dc8d61492e9dc10ba00175c1a6637fa
:commit:00c0e5514de2aab8b9a0be16b5da470b091d9eb9
, :commit:fcd3020dd08c7022a44f709173fe23969d3e8f7c
, thanks @hameerabbasi) sparse.DOK.from_scipy_sparse
method (PR #464, Issue #463, thanks @hameerabbasi).- Black re-formatting (PR #471, PR #484, thanks @GenevieveBuckley, @sayandip18)
- Add
sparse.pad
(PR #474, Issue #438, thanks @H4R5H1T-007) - Switch to GitHub Actions (:compare:
5547b4e92dc8d61492e9dc10ba00175c1a6637fa..a332f22c96a96e5ab9b4384342df67e8f3966f85
) - Fix a number of bugs in format conversion. (PR #504, Issue #503, thanks @hameerabbasi)
- Fix bug in
sparse.matmul
for higher-dimensional arrays. (PR #508, Issue #506, thanks @sayandip18). - Fix scalar conversion to COO (Issue #510, PR #511, thanks @hameerabbasi)
- Fix OOB memory accesses (Issue #515, :commit:
1e24a7e29786e888dee4c02153309986ae4b5dde
thanks @hameerabbasi) - Fixes element-wise ops with scalar COO array. (Issue #505, :commit:
5211441ec685233657ab7156f99eb67e660cee86
, thanks @hameerabbasi) - Fix scalar broadcast_to with
nnz==0
. (Issue #513, :commit:bfabaa0805e811884e79c4bdbfd14316986d65e4
, thanks @hameerabbasi) - Add order parameter to
{zero, ones, full}[_like]
. (Issue #514, :commit:37de1d0141c4375962ecdf18337c2dd0f667b60c
, thanks @hameerabbasi) - Fix tensordot typing bugs. (Issue #493, Issue #499, :commit:
37de1d0141c4375962ecdf18337c2dd0f667b60c
, thanks @hameerabbasi).
0.12.0 / 2021-03-19
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.
- A number of
sparse.GCXS
fixes and additions (PR #409, PR #407, PR #414, PR #417, PR #419 thanks @daletovar) - Ability to change the index dtype for better storage characteristics. (PR #441, thanks @daletovar)
- Some work on
sparse.DOK
arrays to bring them closer to the other formats (PR #435, PR #437, PR #439, PR #440, thanks @DragaDoncila) CSR
andCSC
specializations ofsparse.GCXS
(PR #442, thanks @ivirshup) For now, this is experimental undocumented API, and subject to change.- Fix a number of bugs (PR #407, Issue #406)
- Add
nnz
parameter tosparse.random
(PR #410, thanks @emilmelnikov)
0.11.2 / 2020-09-04
- Fix
TypingError
onsparse.dot
with complex dtypes. (Issue #403, PR #404)
0.11.1 / 2020-08-31
- Fix
ValueError
onsparse.dot
with extremely small values. (Issue #398, PR #399)
0.11.0 / 2020-08-18
- Improve the performance of
sparse.dot
. (Issue #331, PR #389, thanks @daletovar) - Added the
sparse.COO.swapaxes
method. (PR #344, thanks @lueckem) - Added multi-axis 1-D indexing support. (PR #343, thanks @mikeymezher)
- Fix
outer
for arrays that weren't one-dimensional. (Issue #346, PR #347) - Add
casting
kwarg tosparse.COO.astype
. (Issue #391, PR #392) - Fix for
sparse.COO
constructor accepting invalid inputs. (Issue #385, PR #386)
0.10.0 / 2020-05-13
- Fixed a bug where converting an empty DOK array to COO leads to an incorrect dtype. (Issue #314, PR #315)
- Change code formatter to black. (PR #284)
- Add [
sparse.COO.flatten
] andouter
. (Issue #316, PR #317). - Remove broadcasting restriction between sparse arrays and dense arrays. (Issue #306, PR #318)
- Implement deterministic dask tokenization. (Issue #300, PR #320, thanks @danielballan)
- Improve testing around densification (PR #321, thanks @danielballan)
- Simplify Numba extension. (PR #324, thanks @eric-wieser).
- Respect
copy=False
inastype
(PR #328, thanks @eric-wieser). - Replace linear_loc with ravel_multi_index, which is 3x faster. (PR #330, thanks @eric-wieser).
- Add error msg to tensordot operation when
ndim==0
(Issue #332, PR #333, thanks @guilhermeleobas). - Maintainence fixes for Sphinx 3.0 and Numba 0.49, and dropping support for Python 3.5. (PR #337).
- Fixed signature for numpy.clip.
0.9.1 / 2020-01-23
- Fixed a bug where indexing with an empty list could lead to issues. (Issue #281, PR #282)
- Change code formatter to black. (PR #284)
- Add the
sparse.diagonal
andsparse.diagonalize
functions. (Issue #288, PR #289, thanks @pettni) - Add HTML repr for notebooks. (PR #283, thanks @daletovar)
- Avoid making copy of
coords
when making a newsparse.COO
array. - Add stack and concatenate for GCXS. (Issue #301, PR #303, thanks @daletovar).
- Fix issue where functions dispatching to an attribute access wouldn't
work with
__array_function__
. (Issue #308, PR #309). - Add partial support for constructing and mirroring
sparse.COO
objects to Numba.
0.8.0 / 2019-08-26
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)
- Fixed a bug where an array with size == 1 and nnz == 0 could not be broadcast. (Issue #242, PR #243)
- Add
std
andvar
. (PR #244) - Move to Azure Pipelines with CI for Windows, macOS and Linux. (PR #245, PR #246, PR #247, PR #248)
- Add
resize
, and changereshape
so it raises aValueError
on shapes that don't correspond to the same size. (Issue #241, Issue #250, PR #256 thanks, @daletovar) - Add
isposinf
andisneginf
. (Issue #252, PR #253) - Fix
tensordot
when nnz = 0. (Issue #255, PR #256) - Modifications to
__array_function__
to allow for sparse XArrays. (PR #261, thanks @nvictus) - Add not-yet-public support for GCXS. (PR #258, thanks @daletovar)
- Improvements to
__array_function__
. (PR #267, PR #272, thanks @crusaderky) - Convert all Numba lists to typed lists. (PR #264)
- Why write code when it exists elsewhere? (PR #277)
- Fix some element-wise operations with scalars. (PR #278)
- Private modules should be private, and tests should be in the package. (PR #280)
0.7.0 / 2019-03-14
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:
- Fixed a bug where going between
sparse.DOK
andsparse.COO
caused fill-values to be lost. (Issue #225, PR #226). - Fixed warning for a matrix that was incorrectly considered too dense. (Issue #228, PR #229)
- Fixed some warnings in Python 3.7, the fix was needed. in preparation for Python 3.8. (PR #233, thanks @nils-werner)
- Drop support for Python 2.7 (Issue #234, PR #235, thanks @hugovk)
- Clearer error messages (Issue #230, Issue #231, PR #232)
- Restructure requirements.txt files. (PR #236)
- Support fill-value in reductions in specific cases. (Issue #237, PR #238)
- Add
__array_function__
support. (PR #239, thanks, @pentschev) - Cleaner code! (PR #240)
0.6.0 / 2018-12-19
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.
- Fixed a bug where
np.matrix
could sometimes fail to convert to aCOO
. (Issue #199, PR #200). - Make sure that
sparse @ sparse
returns a sparse array. (Issue #201, PR #203) - Bring
operator.matmul
behaviour in line with NumPy forndim > 2
. (Issue #202, PR #204, PR #217) - Make sure
dtype
is preserved with theout
kwarg. (Issue #205, PR #206) - Fix integer overflow in
reduce
on Windows. (Issue #207, PR #208) - Disallow auto-densification. (Issue #218, PR #220)
- Add auto-densification configuration, and a configurable warning for checking if the array is too dense. (PR #210, PR #213)
- Add pruning of fill-values to COO constructor. (PR #221)
0.5.0 / 2018-10-12
- Added
COO.real
,COO.imag
, andCOO.conj
(PR #196). - Added
sparse.kron
function (PR #194, PR #195). - Added
order
parameter toCOO.reshape
to make it work withnp.reshape
(PR #193). - Added
COO.mean
andsparse.nanmean
(PR #190). - Added
sparse.full
andsparse.full_like
(PR #189). - Added
COO.clip
method (PR #185). - Added
COO.copy
method, and changed pickle ofCOO
to not include its cache (PR #184). - Added
sparse.eye
,sparse.zeros
,sparse.zeros_like
,sparse.ones
, andsparse.ones_like
(PR #183).
0.4.1 / 2018-09-12
- Allow mixed
ndarray
-COO
operations if the result is sparse (Issue #124, via PR #182). - Allow specifying a fill-value when converting from NumPy arrays (Issue #179, via PR #180).
- Added
COO.any
andCOO.all
methods (PR #175). - Indexing for
COO
now accepts a single one-dimensional array index (PR #172). - The fill-value can now be something other than zero or
False
(PR #165). - Added a
sparse.roll
function (PR #160). - Numba code now releases the GIL. This leads to better multi-threaded performance in Dask (PR #159).
- A number of bugs occurred, so to resolve them,
COO.coords.dtype
is alwaysnp.int64
.COO
, therefore, uses more memory than before (PR #158). - Add support for saving and loading
COO
files from disk (Issue #153, via PR #154). - Support
COO.nonzero
andnp.argwhere
(Issue #145, via PR #148). - Allow faux in-place operations (Issue #80, via PR #146).
COO
is now always canonical (PR #141).- Improve indexing performance (PR #128).
- Improve element-wise performance (PR #127).
- Reductions now support a negative axis (Issue #117, via PR #118).
- Match behaviour of
ufunc.reduce
from NumPy (Issue #107, via PR #108).
0.3.1 / 2018-04-12
- Fix packaging error (PR #138).
0.3.0 / 2018-02-22
- Add NaN-skipping aggregations (PR #102).
- Add equivalent to
np.where
(PR #102). - N-input universal functions now work (PR #98).
- Make
dot
more consistent with NumPy (PR #96). - Create a base class
SparseArray
(PR #92). - Minimum NumPy version is now 1.13 (PR #90).
- Fix a bug where setting a
DOK
element to zero did nothing (Issue #93, via PR #94).
0.2.0 / 2018-01-25
- Support faster
np.array(COO)
(PR #87). - Add
DOK
type (PR #85). - Fix sum for large arrays (Issue #82, via PR #83).
- Support
.size
and.density
(PR #69). - Documentation added for the package (PR #43).
- Minimum required SciPy version is now 0.19 (PR #70).
len(COO)
now works (PR #68).scalar op COO
now works for all operators (PR #67).- Validate axes for
.transpose()
(PR #61). - Extend indexing support (PR #57).
- Add
random
function for generating random sparse arrays (PR #41). COO(COO)
now copies the original object (PR #55).- NumPy universal functions and reductions now work on
COO
arrays (PR #49). - Fix concatenate and stack for large arrays (Issue #32, via PR #51).
- Fix
nnz
for scalars (Issue #47, via PR #48). - Support more operators and remove all special cases (PR #46).
- Add support for
triu
andtril
(PR #40). - Add support for Ellipsis (
...
) andNone
when indexing (PR #37). - Add support for bitwise bindary operations like
&
and|
(PR #38). - Support broadcasting in element-wise operations (PR #35).