mlx.core.repeat

目录

mlx.core.repeat#

repeat(array: array, repeats: int, axis: int | None = None, *, stream: None | Stream | Device = None) array#

Repeat an array along a specified axis.

参数:
  • 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.

返回:

The resulting repeated array.

返回类型:

array