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