-
Add support for
sparse. Note that unlike other array libraries, array-api-compat does not contain any wrappers forsparsefunctions. Allsparsearray API support is insparseitself. Thus, there is noarray_api_compat.sparsesubmodule, andarray_namespace(<pydata/sparse array>)returns thesparsemodule. -
Added the function
is_pydata_sparse_array(x).
-
Fix JAX
float0arrays. See jax-ml/jax#20620. (@NeilGirdhar) -
Fix
torch.linalg.vector_norm()whenaxis=(). -
Fix
torch.linalg.solve()to apply the array API standard rules for whenx2should be treated as a vector vs. a matrix. -
Fix PyTorch test failures on CI by skipping uint16, uint32, uint64 tests.
-
Drop support for Python 3.8.
-
NumPy 2.0 is now left completely unwrapped.
-
New flag
use_compatto {func}~.array_namespaceto force the use or non-use of the compat wrapper namespace. The default is to return a compat namespace when it is appropiate. -
Fix the
copyflag toasarrayfor NumPy, CuPy, and Dask. -
Fix the
deviceflag toasarrayfor CuPy. -
Fix various issues with
asarrayfor Dask.
-
Test Python 3.12 on CI.
-
Add more tests for {func}
~.array_namespace. -
Add more tests for
asarray. -
Add a test that there are no hard dependencies.
-
Add HTML documentation. Includes new documentation on the scope of the package and new developer documentation.
-
Fix
array_api_compat.numpy.asarray(torch.Tensor)to return a NumPy array. -
Allow Python scalars in torch functions.
-
Fix the
torch.stdwrapper when correction is anint. -
Fix issues with
qrandsvdin the Dask wrappers.
-
Add support for Dask (@lithomas1).
-
Add support for JAX. Note that unlike other array libraries, array-api-compat does not contain any wrappers for JAX functions. All JAX array API support is in JAX itself. Thus, there is no
array_api_compat.jaxsubmodule, andarray_namespace(<JAX array>)returns thejax.experimental.array_apimodule. -
The functions
is_numpy_array(x),is_cupy_array(x),is_torch_array(x),is_dask_array(x),is_jax_array(x)are now part of the publicarray_api_compatAPI. -
Add wrappers for the
fftextension module for NumPy, CuPy, and PyTorch.
-
Allow
'2022.12'as theapi_versionin {func}~.array_namespace().'2021.12'is also supported but will issue a warning since the returned namespace will still be a 2022.12 compliant one. -
Add wrapper for numpy.linalg.solve, which broadcasts the inputs according to the standard.
-
Add wrappers for various PyTorch linalg functions.
-
Fix a bug with
numpy.linalg.vector_norm(keepdims=True). -
BREAKING: Update
vecdotwrappers to applyaxesbefore broadcasting, not after. This matches the updated 2023.12 standard wording, and also the behavior of the newnumpy.vecdotgufunc in NumPy 2.0. -
Fix some linalg functions which were supposed to be in both the main namespace and the linalg extension namespace.
-
Add Ruff to CI. (@adonath)
-
Test that internal definitions of
__all__are self-consistent, which should help to avoid issues where wrappers are accidentally not exported to the compat namespaces properly.
-
Add support for the upcoming NumPy 2.0 release.
-
Added a torch wrapper for
trace(torch.tracedoesn't support theoffsetargument or stacking) -
Wrap numpy, cupy, and torch
nonzeroto raise an error for zero-dimensional input arrays. -
Add torch wrapper for
newaxis. -
Improve error message for
array_namespace -
Fix linalg.cholesky returning the conjugate of the expected upper decomposition for numpy and cupy.
- Releases are now made with GitHub Actions (thanks @matthewfeickert).
-
Fix
torch.result_type()cross-kind promotion (@lucascolley). -
Fix the torch.take() wrapper to make axis optional for ndim = 1.
-
Add requires-python metadata to the package (@matthewfeickert).
- Add 2022.12 standard support.
This includes things like adding complex dtype support, adding the new
takefunction, and various minor changes in the specification.
-
Support
"cpu"in CuPyto_device(). -
Return a new array in NumPy/CuPy
reshape(copy=False). -
Fix signatures for PyTorch
broadcast_toandpermute_dims.
-
Support the linalg extension in the
array_api_compat.torchnamespace. -
Add
isdtype().
- Fix the
kkeyword argument totrilandtriuintorch.
- Rename
get_namespace()toarray_namespace()(get_namespace()is maintained as a backwards compatible alias).
-
The minimum supported NumPy version is now 1.21. Fixed a few issues with NumPy 1.21 (with
unique_*andasarray), although there are also a few known issues with this version (see the README). -
Add
api_versiontoget_namespace(). -
array_namespace()(néeget_namespace()) now works correctly withtorchtensors. -
array_namespace()(néeget_namespace()) now works correctly withnumpy.array_apiarrays. -
array_namespace()(néeget_namespace()) now raisesTypeErrorinstead ofValueError. -
Fix the
torch.stdwrapper. -
Add
torchwrappers forones,empty, andzerosso thatshapecan be passed as a keyword argument.
-
Added support for PyTorch.
-
Add helper function
size()(required if torch is used astorch.Tensor.sizeis a method that is incompatible with the array API.size). -
All wrapper functions that wrap existing library functions now pass through arbitrary
**kwargs.
-
Added CI to run against the array API testsuite.
-
Fix
sort(stable=False)andargsort(stable=False)with CuPy.
- Initial release. Includes support for NumPy and CuPy.