Array manipulation functionsΒΆ

The following functions conform to Python Array API standard:

broadcast_arrays

Broadcasts one or more dpnp.tensor.usm_ndarrays against one another.

broadcast_to

Broadcast an array to a new shape; returns the broadcasted dpnp.tensor.usm_ndarray as a view.

concat

Joins a sequence of arrays along an existing axis.

expand_dims

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

flip

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

moveaxis

Moves axes of an array to new positions.

permute_dims

Permute the axes (dimensions) of an array; returns the permuted array as a view.

repeat

Repeat elements of an array on a per-element basis.

reshape

Reshapes array x into new shape.

roll

Rolls array elements along a specified axis.

squeeze

Removes singleton dimensions (axes) from array x.

stack

Joins a sequence of arrays along a new axis.

swapaxes

Interchanges two axes of an array.

tile

Repeat an input array x along each axis a number of times given by repetitions.

unstack

Splits an array in a sequence of arrays along the given axis.