fn
hstack
→Tensorhstack(tensors: list[Tensor])Stack tensors horizontally (column-wise).
For 1-D inputs this concatenates along axis 0; for higher rank inputs
it concatenates along axis 1. Convenience wrapper around
cat/concat.
Parameters
tensorslist of TensorTensors to stack. Shapes must agree on all axes except the one
being concatenated.
Returns
TensorConcatenated tensor.
Notes
Mirrors NumPy's hstack behaviour: the axis selection depends on
input rank, which can surprise users — prefer cat with an
explicit dim when clarity matters.
Examples
>>> import lucid
>>> a = lucid.tensor([[1, 2], [3, 4]])
>>> b = lucid.tensor([[5], [6]])
>>> lucid.hstack([a, b])
Tensor([[1, 2, 5],
[3, 4, 6]])