array-api
array-api copied to clipboard
feat: add `reciprocal` to the specification
This PR
- resolves https://github.com/data-apis/array-api/issues/790 by adding support for computing the reciprocal to the specification.
- requires that special cases be handled as if implemented as
1.0 / x. - adopts the same "type promotion" language as other unary element-wise APIs, which is based on the premise that an input array promotes to itself. If this language should be changed, we should do as part of a follow-up PR across all relevant element-wise APIs.
- requires ("should") that the input array have a floating-point data type, as the output array should have a floating-point data type and promotion of mixed kinds is left unspecified.