tf.keras.ops.column_stack
Stay organized with collections
Save and categorize content based on your preferences.
Note: This API is new and only available via pip install tf-nightly.
Stack 1-D tensors as columns into a 2-D tensor.
tf . keras . ops . column_stack (
xs
)
Take a sequence of 1-D tensors and stack them as columns to make a
single 2-D tensor. 2-D tensors are stacked as-is, like with
hstack. Tensors with more than 2 dimensions are concatenated
along the second axis.
Args
xs
Sequence of tensors.
Returns
The tensor formed by stacking the given tensors.
Example:
a = keras . ops . array ([ 1 , 2 , 3 ])
b = keras . ops . array ([ 4 , 5 , 6 ])
keras . ops . column_stack ([ a , b ])
array ([[ 1 , 4 ],
[ 2 , 5 ],
[ 3 , 6 ]])
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license .
Last updated 2026-10-31 UTC.
[null,null,["Last updated 2026-10-31 UTC."],[],[]]