paul wrote: > In numpy/linalg/linalg.py, the function det(a) does a fastCopyAndTranspose of > a > before calling lapack. Is that necessary as det(a.T) = det(a)? > > >
If you look further down in the function (or read the docstring), you'll see that det(a) computes the determinant by first performing an LU decomposition of the array. It does this using the Lapack function dgetrf or zgetrf. These functions perform the factorization 'in-place', so it is necessary to make a copy first. I don't know why the "CopyAndTranspose" function is used--maybe it is faster--but, as you point out, the fact that the copy has been transposed should not affect the result. Warren > _______________________________________________ > 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
