fn
vstack
→Tensorvstack(tensors: list[Tensor])Stack tensors vertically (row-wise).
1-D inputs are treated as rows of length size; higher-rank
inputs are concatenated along axis 0. Convenience wrapper around
cat.
Parameters
tensorslist of TensorTensors with compatible shapes.
Returns
TensorConcatenated tensor.
Notes
Counterpart to hstack (axis 1) and dstack (axis 2). As
with hstack, prefer cat with an explicit dim for
clarity in generic-rank code.
Examples
>>> import lucid
>>> a = lucid.tensor([1, 2, 3])
>>> b = lucid.tensor([4, 5, 6])
>>> lucid.vstack([a, b])
Tensor([[1, 2, 3],
[4, 5, 6]])