fn
column_stack
→Tensorcolumn_stack(tensors: Sequence[Tensor])Stack tensors as columns of a 2-D matrix.
Each 1-D tensor is first promoted to a column vector of shape
(N, 1); tensors with rank >= 2 are passed through unchanged.
The results are then concatenated along axis 1.
Parameters
tensorsSequence[Tensor]Tensors to stack. 1-D tensors are reshaped to column form;
higher-rank tensors must already have matching first-axis size.
Returns
Tensor2-D tensor formed by concatenating the (possibly promoted) inputs along axis 1.
Notes
For all-1-D inputs of length N,
the result has shape (N, k):
For higher-rank inputs, the first dimension is the "row count" along which axis-1 concatenation happens, matching NumPy semantics.
Examples
>>> import lucid
>>> a = lucid.tensor([1., 2., 3.])
>>> b = lucid.tensor([4., 5., 6.])
>>> lucid.column_stack([a, b])
Tensor([[1., 4.],
[2., 5.],
[3., 6.]])