API specificationΒΆ
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.
- Array object
- Operators
- Attributes
- Methods
- __abs__
- __add__
- __and__
- __array_namespace__
- __bool__
- __complex__
- __dlpack__
- __dlpack_device__
- __eq__
- __float__
- __floordiv__
- __ge__
- __getitem__
- __gt__
- __index__
- __int__
- __invert__
- __le__
- __lshift__
- __lt__
- __matmul__
- __mod__
- __mul__
- __ne__
- __neg__
- __or__
- __pos__
- __pow__
- __rshift__
- __setitem__
- __sub__
- __truediv__
- __xor__
- to_device
- Broadcasting
- Constants
- Creation Functions
- Data Type Functions
- Data Types
- Element-wise Functions
- Objects in API
- abs
- acos
- acosh
- add
- asin
- asinh
- atan
- atan2
- atanh
- bitwise_and
- bitwise_left_shift
- bitwise_invert
- bitwise_or
- bitwise_right_shift
- bitwise_xor
- ceil
- clip
- conj
- copysign
- cos
- cosh
- divide
- equal
- exp
- expm1
- floor
- floor_divide
- greater
- greater_equal
- hypot
- imag
- isfinite
- isinf
- isnan
- less
- less_equal
- log
- log1p
- log2
- log10
- logaddexp
- logical_and
- logical_not
- logical_or
- logical_xor
- maximum
- minimum
- multiply
- negative
- not_equal
- positive
- pow
- real
- remainder
- round
- sign
- signbit
- sin
- sinh
- square
- sqrt
- subtract
- tan
- tanh
- trunc
- Objects in API
- Function and method signatures
- Indexing
- Indexing Functions
- Inspection
- Linear Algebra Functions
- Manipulation Functions
- Searching Functions
- Set Functions
- Sorting Functions
- Statistical Functions
- Type Promotion Rules
- Utility Functions
- Version