array-api
array-api copied to clipboard
RFC document, tooling and other content related to the array API standard
This PR - adds a specification for `real`, an API for returning the real component of a complex number for each element ``x_i`` of an input array ``x``. - chooses...
This RFC seeks to propose a means for tracking array API compliance. ## Overview Currently, consumers of array libraries lack a centralized mechanism for determining whether any given array API...
NumPy allows this behavior in setitem ```py >>> import numpy as np >>> x = np.empty((2, 3, 4)) >>> a = np.empty((1, 3, 4)) >>> x[1, ...].shape (3, 4) >>>...
In the current specification, there are not standardized data type objects, or a specification as to what a data type object needs to implement: https://data-apis.org/array-api/latest/API_specification/data_types.html Additionally, there's no APIs in...
The purpose of this issue is to determine how, or if, broadcasting behavior should be specified for `linalg.cross`. ## Overview At the moment, `linalg.cross` is specified to only compute the...
This PR - addresses https://github.com/data-apis/array-api/issues/415 by adding support for broadcasting to `linalg.cross`. Broadcasting follows NumPy behavior in only broadcasting the non-compute dimensions. With the exception of TensorFlow, this behavior is...
## Current Status Current API spec defines the `linalg.outer` behaviour for one-dimensional vector inputs only. Quoting from the [docs](https://data-apis.org/array-api/latest/extensions/linear_algebra_functions.html#linalg-outer-x1-x2). > Computes the outer product of two vectors x1 and x2...
Right now `finfo` requires that the output fields be `float` https://data-apis.org/array-api/latest/API_specification/generated/signatures.data_type_functions.finfo.html#signatures.data_type_functions.finfo. However, making the results 0-D arrays would be better. For the spec itself, `float` is fine, but it's problematic...
Here is an implementation of the broadcasting algorithm from the spec: ```python import operator def broadcasted_shape(sh1, sh2): if not isinstance(sh1, (tuple, list)) or not isinstance(sh2, (tuple, list)): raise TypeError shape1...
This question was raised by @shwina during an internal discussion: If I create two array objects, one from `cupy.array_api` and another from `numpy.array_api`, if I do `a+b` or `b+a` what...