dpctl.tensor.unstack

dpctl.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:

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

Return type:

Tuple[usm_ndarray,…]

Raises:

AxisError – if the axis value is invalid.