Skip to content
fn

tile

→Tensor
tile(input: Tensor, dims: _int | Sequence[_int])

Implementing kernel

C++ engine symbols that back this Python API.

Construct a tensor by repeating input dims times per axis.

Unlike repeat (single axis), tile accepts a per-axis repetition vector. If len(dims) < input.ndim it is padded on the left with 1's; if greater, input is treated as having leading size-1 dims.

Parameters

inputTensor
Source tensor.
dimsint or sequence of int
Repetition counts per axis (right-aligned with input shape).

Returns

Tensor

Tiled tensor.

Notes

Equivalent to repeated cat calls along each axis; useful for building blocky patterns or batch broadcasts that need a real copy rather than a stride-0 view.

Examples

>>> import lucid
>>> x = lucid.tensor([1, 2, 3])
>>> lucid.tile(x, (2,))
Tensor([1, 2, 3, 1, 2, 3])