latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.vstack
- tensorplay.functional.vstack(tensors, *, out=None) Tensor[source]
Stack tensors in sequence vertically (row wise).
This is equivalent to concatenation along the first axis after all 1-D tensors have been reshaped by
tensorplay.atleast_2d().- Parameters:
tensors (sequence of Tensors) – sequence of tensors to concatenate
- Keyword Arguments:
out (Tensor, optional) – the output tensor.
Example:
>>> a = tensorplay.tensor([1, 2, 3]) >>> b = tensorplay.tensor([4, 5, 6]) >>> tensorplay.vstack((a,b)) tensor([[1, 2, 3], [4, 5, 6]]) >>> a = tensorplay.tensor([[1],[2],[3]]) >>> b = tensorplay.tensor([[4],[5],[6]]) >>> tensorplay.vstack((a,b)) tensor([[1], [2], [3], [4], [5], [6]])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

