array-api-compat icon indicating copy to clipboard operation
array-api-compat copied to clipboard

Compatibility layer for common array libraries to support the Array API

Results 59 array-api-compat issues
Sort by recently updated
recently updated
newest added

- Add support for multiple devices in CuPy **UNTESTED:** I don't know how to test this without a dual-GPU box, which I don't have access to. Suggestions welcome. At any...

Very early prototype inspired by https://github.com/mdhaber/marray/ FYI @mdhaber @lucascolley # Demo ```python >>> import dask.array as da, cupy as cp >>> from array_api_compat import array_namespace >>> x = da.from_array(cp.asarray(0)) >>>...

enhancement

#288 introduced `__dir__`, which completely neutered `test_all`. Instead of reverting the change, this PR attempts to reinvent the test to be more useful. CC @jorenham @ev-br

The `result_type` of many `int`/`uint` and `uint`/`uint` combinations are defined by the standard, but `torch.result_type` does not support them. For instance: ```python3 from array_api_compat import torch torch.result_type(torch.uint16, torch.uint32) # RuntimeError:...

blocked by upstream

Support Paddle framework in array-api-compat, but still working in progress. TODO List: - [x] https://github.com/PaddlePaddle/Paddle/pull/69632 - [x] https://github.com/PaddlePaddle/Paddle/pull/69477 Related issue:

enhancement

The standard [specifies ](https://data-apis.org/array-api/latest/API_specification/generated/array_api.repeat.html) that the second argument of `repeat` ("`repeats`") can be an array of integers, but CuPy doesn't support this. ```python3 from array_api_compat import cupy as xp #...

blocked by upstream

Per the 2024.12 standard, these should work, but don't: ```python3 from array_api_compat import torch as xp xp.minimum(xp.asarray(1), 2) # TypeError: minimum(): argument 'other' (position 2) must be Tensor, not int...

blocked by upstream

According to the standard, the documentation of [`sum`](https://data-apis.org/array-api/2023.12/API_specification/generated/array_api.sum.html) states for the `dtype` parameter: > If `None`, the returned array must have the same data type as `x`, unless `x` has...

blocked by upstream

so that there's a chance to catch things like gh-273