# mlx.core.reshape — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.reshape

mlx.core.reshape(a: array, /, shape: List[ int ], *, stream: Union[ None , Stream , Device ] = None) → array

  Reshape an array while preserving the size.

  Parameters:

    - 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.

  Returns:

    The reshaped array.

  Return type:

    array