tf.keras.ops.column_stack

Stack 1-D tensors as columns into a 2-D tensor.

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.

xs Sequence of tensors.

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]])