This RFC requests to include a new API in the array API specification for the purpose of computing the base-2 exponential.
Overview
Based on array comparison data, the API is available in the majority of libraries in the PyData ecosystem.
The Array API specification currently includes log2, exp, and pow, but does not include the IEEE 754 function exp2. Would be nice to add for completeness.
- log2:
|
def log2(x: array, /) -> array: |
While this can currently be achieved now by using pow, exp2 is commonly implemented as a slightly more ergonomic perf path.
Prior art
Proposal:
def exp2(x: array, /) -> array
cc @kgryte
This RFC requests to include a new API in the array API specification for the purpose of computing the base-2 exponential.
Overview
Based on array comparison data, the API is available in the majority of libraries in the PyData ecosystem.
The Array API specification currently includes
log2,exp, andpow, but does not include the IEEE 754 functionexp2. Would be nice to add for completeness.array-api/src/array_api_stubs/_2022_12/elementwise_functions.py
Line 1455 in 3d91878
While this can currently be achieved now by using
pow,exp2is commonly implemented as a slightly more ergonomic perf path.Prior art
Proposal:
cc @kgryte