Join GitHub today
incorrect lwork assertion in f2py wrapper for LAPACK xGERQF (Trac #1645) #2170
Original ticket http://projects.scipy.org/scipy/ticket/1645 on 2012-04-19 by trac user mike.wimmer, assigned to unknown.
I noticed that the f2py wrapper for xGERQF has a wrong assertion with respect to the workspace size: In lines 575-580 of flapack.pyf.src (that's the name in the current development version, in 0.10.1 where I found the mistake, it's generic_flapack.pyf.src) we see
i.e. a requirement that lwork > number of columns of the array. From the LAPACK documentation however (i.e. http://www.netlib.org/lapack/double/dgerqf.f ) we find
with M the number of rows.
Hence, line 580 of flapack.pyf.src should read instead
I discovered this problem while linking scipy to MKL, where some of the RQ tests failed because of this issue.
trac user mike.wimmer wrote on 2012-05-03
Replying to [comment:1 rgommers]:
You are right, the same problem also exists in the xORGRQ and xUNGRQ wrappers. The rest is fine though. It's just that rows and columns are interchanged in the RQ-decomposition wrappers.