dpctl.tensor.tile(x, repetitions)[source]

Repeat an input array x along each axis a number of times given by repetitions.

For N = len(repetitions) and M = len(x.shape):

  • If M < N, x will have N - M new axes prepended to its shape

  • If M > N, repetitions will have M - N ones prepended to it

  • x (usm_ndarray) – input array

  • repetitions (Union[int, Tuple[int, ...]]) – The number of repetitions along each dimension of x.


tiled output array.

The returned array will have rank max(M, N). If S is the shape of x after prepending dimensions and R is repetitions after prepending ones, then the shape of the result will be S[i] * R[i] for each dimension i.

The returned array will have the same data type as x. The returned array will be located on the same device as x and have the same USM allocation type as x.

Return type: