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) -- Input array.

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

回傳:

The array with inserted dimensions.

回傳型別:

array