On Tue, Jan 19, 2010 at 4:11 PM, Gael Varoquaux <[email protected]> wrote: >> you can combine x, and y for one call to leastsq, if it makes a difference >> linalg.lstsq(confounds.T, [x,y]) #format? columnstack? > > Indeed! Thank you Joseph. That's a gain of 10% in the total computation > time of my algorithm (and 20% on the partial correlation calculation).
if you have z=[x,y] stacked, just one call to dot might also help for the correlation zz = dot(z.T, z) zz/sqrt(zz[0,0]*zz[1,1]) You might be able to do everything in a stacked version/ there is no ph in Josef (unless you talk about my french father-in-law) Josef > > Gaël > _______________________________________________ > NumPy-Discussion mailing list > [email protected] > http://mail.scipy.org/mailman/listinfo/numpy-discussion > _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
