[Numpy-discussion] fastest way to make two vectors into an array
list at jsaul.de
Thu Jan 30 01:20:04 EST 2003
* John Hunter [2003-01-29 22:13]:
> def somefunc(x,y):
> X = zeros( (len(x),2), typecode=x.typecode())
> X[:,0] = x
> X[:,1] = y
> Is this the fastest way?
X = transpose(array([x]+[y]))
It may not be the fastest possible way, but should be about a
factor of two faster; better than nothing.
More information about the NumPy-Discussion