mlx.core.reshape

目錄

mlx.core.reshape#

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

Reshape an array while preserving the size.

參數:
  • a (array) -- Input array.

  • shape (tuple(int)) -- New shape.

  • stream (Stream, optional) -- Stream or device. Defaults to None in which case the default stream of the default device is used.

回傳:

The reshaped array.

回傳型別:

array