> 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). Gaël