mlx.core.expand_dims

目錄

mlx.core.expand_dims#

expand_dims(a: array, /, axis: int | Sequence[int], *, stream: None | Stream | Device = None) array#

Add a size one dimension at the given axis.

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

  • axes (int or tuple(int)) -- The index of the inserted dimensions.

回傳值:

The array with inserted dimensions.

回傳值型別:

array