mindspore.ops.column_stack
- mindspore.ops.column_stack(tensors)[source]
Creates a new tensor by horizontally stacking the tensors in tensors. Similar to
mindspore.ops.hstack()
.- Parameters
tensors (Union[tuple[Tensor], list[Tensor]]) – The tensors to be concatenated.
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> x1 = mindspore.tensor([1, 1, 1]) >>> x2 = mindspore.tensor([2, 2, 2]) >>> output = mindspore.ops.column_stack((x1, x2)) >>> print(output) [[1 2] [1 2] [1 2]]