Stacks tensors in sequence vertically. This is equivalent to concatenation along the first axis. 1-D tensors should firstly be reshaped to (1, N), and then be concatenated along the first axis.
Stacked Tensor, formed by stacking the given tensors.
- Supported Platforms:
>>> import mindspore.numpy as np >>> x1 = np.array([1, 2, 3]).astype('int32') >>> x2 = np.array([4, 5, 6]).astype('int32') >>> output = np.vstack((x1, x2)) >>> print(output) [[1 2 3] [4 5 6]]