# mlx.core.stack — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.stack

mlx.core.stack(arrays: List[ array ], axis: Optional[ int ] = 0, *, stream: Union[ None , Stream , Device ] = None) → array

  Stacks the arrays along a new axis.

  Parameters:

    - arrays (list ( array )) – A list of arrays to stack.

    - axis (int , optional) – The axis in the result array along which the input arrays are stacked. Defaults to `0`.

    - stream (Stream , optional) – Stream or device. Defaults to `None`.

  Returns:

    The resulting stacked array.

  Return type:

    array