Re: [SciPy-Dev] calc_lwork.f different from Lapack?
On Wed, Apr 13, 2011 at 9:11 PM, Josh Lawrence <josh.k.lawrence@gmail.com> wrote:
Hello,
After receiving an error in using linalg.lstsq, I started some investigating. I found that scipy/linalg/src/calc_lwork.f is essentially a stripped down version of the appropriate functions in Lapack (for linalg.lstsq using double precision complex numbers, it is ZGELSS). It seems that the portions for gelss in calc_lwork.f do not match the current version of lapack. I believe this is the source of my error (it doesn't occur if I use linalg.pinv2 for least squares instead). Is there a particular rationale for these being different or perhaps an incorrect copy and paste? The relevant portions are shown below (a line of % characters are prepended before the codes from the two locations).
Hi Josh! I think we could avoid some of these problems by using the LAPACK workspace query mechanism instead of calc_lwork. I submitted a patch for this: https://github.com/scipy/scipy/pull/13 It would be great if you could comment on it and confirm that it solves the problem. Best, Fabian
participants (1)
-
Fabian Pedregosa