[Numpy-discussion] fastest way to make two vectors into an array
jdhunter at ace.bsd.uchicago.edu
Wed Jan 29 13:13:03 CST 2003
I have two equal length 1D arrays of 256-4096 complex or floating
point numbers which I need to put into a shape=(len(x),2) array.
I need to do this a lot, so I would like to use the most efficient
means. Currently I am doing:
X = zeros( (len(x),2), typecode=x.typecode())
X[:,0] = x
X[:,1] = y
Is this the fastest way?
More information about the Numpy-discussion