Hi there, Forgive me for turning to the mailing list to do my homework. I am currently optimizing a code, and it turns out that the main bottleneck is the orthogonalisation of a vector 'y' to a set of vectors 'confounds', that I am currently doing with the following code:
y = y - np.dot(confounds.T, linalg.lstsq(confounds.T, y)[0]) with np = numpy and linalg = scipy.linalg where scipy calls ATLAS. Most of the time is spent in linalg.lstsq. The length of the vectors is 810, and there are about 10 confounds. Is there a better way of doing this? Cheers, Gaƫl _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
