# mlx.core.moveaxis — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.moveaxis

mlx.core.moveaxis(a: array, /, source: int, destination: int, *, stream: Union[ None , Stream , Device ] = None) → array

  Move an axis to a new position.

  Parameters:

    - a (array) – Input array.

    - source (int) – Specifies the source axis.

    - destination (int) – Specifies the destination axis.

  Returns:

    The array with the axis moved.

  Return type:

    array