From: Joachim S. <li...@js...> - 2003-01-30 09:19:48
|
* 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 > do_something_with(X) > > 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. Cheers, Joachim |