API specification — Python array API standard 2024.12 documentation (original) (raw)
A conforming implementation of the array API standard must provide and support the APIs and behavior detailed in this specification while adhering to the following conventions.
- When a function signature includes a
/
, positional parameters must be positional-only parameters. See Function and method signatures. - When a function signature includes a
*
, optional parameters must be keyword-only arguments. See Function and method signatures. - Broadcasting semantics must follow the semantics defined in Broadcasting.
- Unless stated otherwise, functions must support the data types defined in Data Types.
- Functions may only be required for a subset of input data types. Libraries may choose to implement functions for additional data types, but that behavior is not required by the specification. See Data Type Categories.
- Unless stated otherwise, functions must adhere to the type promotion rules defined in Type Promotion Rules.
- Unless stated otherwise, floating-point operations must adhere to IEEE 754-2019.
- Unless stated otherwise, element-wise mathematical functions must satisfy the minimum accuracy requirements defined in Accuracy.