array-api
array-api copied to clipboard
RFC document, tooling and other content related to the array API standard
Based on discussion in dmlc/dlpack#57, `array.__dlpack__` method supports `stream` keyword, implementing @tqchen's [suggestion](https://github.com/dmlc/dlpack/issues/57#issuecomment-753696812) for synchronization semantics. The `from_dlpack` command in array API does not support it at present though, requiring...
The inspection API mentions "default device" in several places, for instance - https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.default_device.html#array_api.info.default_device - https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.default_dtypes.html#array_api.info.default_dtypes - https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.dtypes.html#array_api.info.dtypes However, as far as I can tell, this term is never actually defined...
## Prior art - NumPy - https://numpy.org/doc/stable/reference/generated/numpy.kron.html - CuPy - https://docs.cupy.dev/en/latest/reference/generated/cupy.kron.html - Dask - https://github.com/dask/dask/issues/3657 - JAX - https://jax.readthedocs.io/en/latest/_autosummary/jax.numpy.kron.html - PyTorch - https://pytorch.org/docs/stable/generated/torch.kron.html - Tensorflow - https://github.com/tensorflow/tensorflow/blob/v2.16.1/tensorflow/python/ops/numpy_ops/np_math_ops.py#L436-L469 ## Motivation We...
An example from SciPy: ```python n_clusters = int(xp.unique_values(T).shape[0]) ``` We calculate the number of unique values in `T` via a data-dependent shape. As noted in the spec for [`unique_values`](https://data-apis.org/array-api/latest/API_specification/generated/array_api.unique_values.html#api-specification-generated-array-api-unique-values--page-root), the...
The standard says: > Providing an empty tuple or an ellipsis to an array of rank 0 must result in an array of the same rank (i.e., if A has...
The specification page for [`__dlpack__`](https://data-apis.org/array-api/latest/API_specification/generated/array_api.array.__dlpack__.html) requires the following two, conflicting things: for the `dlpack_device` argument > The v2023.12 standard only mandates that a compliant library should offer a way for...
The accuracy section of this standard states ``` The results of element-wise arithmetic operations ... for floating-point operands must return the nearest representable value according to IEEE 754-2019 and a...
The wording for in-place operators may be more explicit to warn users that in-place operations, e.g., `x1 += x2`, where Type Promotion Rules require `x1 + x2` to have data...
In accuracy.rst, correct rounding is required for add, sub, mul, and divide. I propose adding sqrt to this list. Note that sqrt is not listed later among the mathematical functions...