cunumeric.repeat#

cunumeric.repeat(a: ndarray, repeats: Any, axis: int | None = None) ndarray#

Repeat elements of an array.

Parameters:
  • a (array_like) – Input array.

  • repeats (int or ndarray[int]) – The number of repetitions for each element. repeats is broadcasted 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.

Returns:

repeated_array – Output array which has the same shape as a, except along the given axis.

Return type:

ndarray

Notes

Currently, repeat operations supports only 1D arrays

See also

numpy.repeat

Availability:

Multiple GPUs, Multiple CPUs