Executing
import numpy as np
t1 = np.arange(1,10)
t2 = np.arange(11,20)
t3 = np.concatenate((t1,t2),axis=1)
results in a
Trac
This is because of Numpy's way of representing 1D arrays. The following using reshape() will work:
t3 = np.concatenate((t1.reshape(-1,1),t2.reshape(-1,1),axis=1)
Explanation: This is the shape of the 1D array when initially created:
t1 = np.arange(1,10)
t1.shape
>>(9,)
'np.concatenate' and many other functions don't like the missing dimension. Reshape does the following:
t1.reshape(-1,1).shape
>>(9,1)