# mlx.core.repeat — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.repeat

mlx.core.repeat(array: array, repeats: int, axis: Optional[ int ] = None, *, stream: Union[ None , Stream , Device ] = None) → array

  Repeat an array along a specified axis.

  Parameters:

    - array (array) – Input array.

    - repeats (int) – The number of repetitions for each element.

    - axis (int , optional) – The axis in which to repeat the array along. If unspecified it uses the flattened array of the input and repeats along axis 0.

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

  Returns:

    The resulting repeated array.

  Return type:

    array