Numpy zip function
Stack the input arrays depth-wise using numpy.dstack()
and get rid of the singleton dimension using numpy.squeeze()
and then assign the result to co-ordinate variables x1
, x2
, and x3
as in:
In [84]: x1, x2, x3 = np.squeeze(np.dstack((x,y)))
# outputs
In [85]: x1
Out[85]: array([ 1, 11])
In [86]: x2
Out[86]: array([ 2, 22])
In [87]: x3
Out[87]: array([ 3, 33])
Just use
x1, x2, x3 = np.vstack([x,y]).T