Skip to content

RFC: add exp2 function to the standard #591

Open
@steff456

Description

@steff456

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    API extensionAdds new functions or objects to the API.RFCRequest for comments. Feature requests and proposed changes.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions