unstack

ivy.unstack(x: Union[ivy.Array, ivy.NativeArray], axis: int, keepdims: bool = False, f: Optional[ivy.Framework] = None) → Union[ivy.Array, ivy.NativeArray][source]

Unpacks the given dimension of a rank-R array into rank-(R-1) arrays.

Parameters
  • x (array) – Input array to unstack.

  • axis (int) – Axis for which to unpack the array.

  • keepdims (bool, optional) – Whether to keep dimension 1 in the unstack dimensions. Default is False.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.

Returns

List of arrays, unpacked along specified dimensions.


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty