You can use np.column_stack -
np.column_stack((X,Y,Z))
Or np.concatenate along axis=1 -
np.concatenate((X,Y,Z),axis=1)
Or np.hstack -
np.hstack((X,Y,Z))
Or np.stack along axis=0 and then do multi-dim transpose -
np.stack((X,Y,Z),axis=0).T
Reshape applies on an array, not to stack or concatenate arrays together. So, reshape alone doesn't make sense here.
One could argue using np.reshape to give us the desired output, like so -
np.reshape((X,Y,Z),(3,4)).T
But, under the hoods its doing the stacking operation, which AFAIK is something to convert to array with np.asarray -
In [453]: np.asarray((X,Y,Z))
Out[453]:
array([[[ 1],
[ 2],
[ 3],
[ 4]],
[[ 5],
[ 6],
[ 7],
[ 8]],
[[ 9],
[10],
[11],
[12]]])
We just need to use multi-dim transpose on it, to give us a 3D array version of the expected output -
In [454]: np.asarray((X,Y,Z)).T
Out[454]:
array([[[ 1, 5, 9],
[ 2, 6, 10],
[ 3, 7, 11],
[ 4, 8, 12]]])