combine lists python 2d\ code example
Example 1: python combine two lists into matrix
np.column_stack(([1, 2, 3], [4, 5, 6]))
array([[1, 4],
[2, 5],
[3, 6]])
Example 2: python combine two lists into matrix
np.c_[[1,2,3], [4,5,6]]
np.column_stack(([1, 2, 3], [4, 5, 6]))
array([[1, 4],
[2, 5],
[3, 6]])
np.c_[[1,2,3], [4,5,6]]