mlx.core.repeat

目录

mlx.core.repeat#

重复(数组 数组, 重复 int, int | = , *, None | Stream | Device = ) 数组#

沿指定轴重复数组。

Parameters
  • array (array) – 输入数组。

  • repeats (int) – 每个元素的重复次数。

  • axis (int, optional) – 沿着哪个轴重复数组。如果未指定,则使用输入的扁平化数组并沿着轴0重复。

  • stream (Stream, 可选) – 流或设备。默认为 None

Returns

生成的重复数组。

Return type

数组