Utility Functions

Array API specification for utility functions.

A conforming implementation of the array API standard must provide and support the following functions adhering to the following conventions.

  • Positional parameters must be positional-only parameters. Positional-only parameters have no externally-usable name. When a function accepting positional-only parameters is called, positional arguments are mapped to these parameters based solely on their order.

  • Optional parameters must be keyword-only arguments.

  • Broadcasting semantics must follow the semantics defined in Broadcasting.

  • Unless stated otherwise, functions must support the data types defined in Data Types.

  • 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.

Objects in API

all(x, /, *, axis=None, keepdims=False)

Tests whether all input array elements evaluate to True along a specified axis.

any(x, /, *, axis=None, keepdims=False)

Tests whether any input array element evaluates to True along a specified axis.