Manipulation Functions

Array API specification for manipulating arrays.

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

Objects in API

broadcast_arrays(*arrays)

Broadcasts one or more arrays against one another.

broadcast_to(x, /, shape)

Broadcasts an array to a specified shape.

concat(arrays, /, *, axis=0)

Joins a sequence of arrays along an existing axis.

expand_dims(x, /, *, axis=0)

Expands the shape of an array by inserting a new axis (dimension) of size one at the position specified by axis.

flip(x, /, *, axis=None)

Reverses the order of elements in an array along the given axis.

permute_dims(x, /, axes)

Permutes the axes (dimensions) of an array x.

reshape(x, /, shape, *, copy=None)

Reshapes an array without changing its data.

roll(x, /, shift, *, axis=None)

Rolls array elements along a specified axis.

squeeze(x, /, axis)

Removes singleton dimensions (axes) from x.

stack(arrays, /, *, axis=0)

Joins a sequence of arrays along a new axis.