dpnp.tensor.unstack

dpnp.tensor.unstack(X, /, *, axis=0)[source]

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

Parameters:
  • x (usm_ndarray) -- Input array.

  • axis (int, optional) --

    Axis along which x is unstacked. If x has rank (i.e, number of dimensions) N, a valid axis must reside in the half-open interval [-N, N).

    Default: 0.

Returns:

out -- Output sequence of arrays which are views into the input array.

Return type:

tuple of usm_ndarrays

Raises:

AxisError -- If the axis value is invalid.