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