mlx.core.unstack

目錄

mlx.core.unstack#

unstack(x: array, /, *, axis: int = 0, stream: None | Stream | Device = None) list[array]#

Split an array into a sequence of arrays along the given axis.

The inverse of stack(). The given axis is removed from each of the returned arrays.

參數:
  • x (array) -- 輸入陣列。

  • axis (int, optional) -- Axis along which to unstack. Default: 0.

回傳值:

A list of arrays, one for each index along axis.

回傳值型別:

list(array)