array-api-compat
array-api-compat copied to clipboard
Compatibility layer for common array libraries to support the Array API
A bunch of array-api-tests are failing with the latest version of PyTorch with `RuntimeError: Promotion for uint16, uint32, uint64 types is not supported, attempted to promote Int and UInt16`. It...
Neither propagate nans correctly, and torch does not support complex numbers. Fixes https://github.com/data-apis/array-api-compat/issues/136
closes gh-156
#127 Fixes https://github.com/data-apis/array-api-compat/issues/152
I would like the following not to fail with PyTorch: ```python >>> import array_api_compat.torch as xp >>> data = xp.linspace(0, 1, num=5, device="mps") >>> xp.clip(data, 0.1, 0.9) Traceback (most recent...
```python In [2]: from scipy._lib.array_api_compat.dask.array import clip In [3]: import dask.array as da In [4]: clip(da.asarray(0), max=7) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[4], line 1 ----> 1...
MLX is an array library for use on apple silicon. It is intended to closely follow the python Array API however some difference exist. https://github.com/ml-explore/mlx?tab=readme-ov-file It would be useful to...
Pasting these here as they aren't easy to re-run ``` ==================================================================================================== FAILURES ===================================================================================================== ___________________________________________________________________________________ test_has_names[statistical-cumulative_sum] ____________________________________________________________________________________ category = 'statistical', name = 'cumulative_sum' @pytest.mark.parametrize("category, name", has_name_params) def test_has_names(category, name): if category...
They are just ignored. This makes array_namespace easier to use for functions that accept either arrays or scalars. I'm not sure if I should have this behavior by default, or...
This references the PR data-apis/array-api-tests#274 and implements the compatibility layer for `top_k`. ## Summary of Compatibility * `jax`: * JAX's `top_k` does not implement `axis` or `largest` arguments. While `axis`...