ivy.repeat(x: ivy.NativeArray, repeats: Union[int, List[int]], axis: Optional[int] = None, f: Optional[ivy.Framework] = None) → ivy.NativeArray[source]

Repeat values along a given dimension

  • x (array) – Input array.

  • repeats (int or sequence of ints.) – The number of repetitions for each element. repeats is broadcast to fit the shape of the given axis.

  • axis (int, optional) – The axis along which to repeat values. By default, use the flattened input array, and return a flat output array.

  • f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.


The repeated output array.

Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty