fn
concat
→Tensorconcat(tensors: list[Tensor], dim: int = ...)Alias for cat.
Concatenates a list of tensors along an existing dimension. Provided for naming parity with array libraries that prefer the longer name.
Parameters
tensorslist of TensorTensors to concatenate.
dimint= ...Concatenation dimension.
Returns
TensorThe concatenated tensor.
Notes
Behaviour is identical to cat — see that function for the
precise contract and edge cases.
Examples
>>> import lucid
>>> lucid.concat([lucid.tensor([1, 2]), lucid.tensor([3, 4])], dim=0)
Tensor([1, 2, 3, 4])