[SciPy-user] Wrapping geqp3 (Rank revealing QR)

Pearu Peterson pearu at scipy.org
Fri Feb 24 07:18:02 CST 2006



On Fri, 24 Feb 2006, Nils Wagner wrote:

> Hi all,
>
> I was trying to wrap geqp3...(my homework as suggested by Arnd ;-) )
> It turns out that it is not straightforward (at least for me).
>
> I have used an example taken from generic_flapack.pyf

First, all addition to lapack wrapping should be commited to
scipy/Lib/lib/lapack. Signatures for geqp3 should be added to
flapack_llsc.pyf.src file in scipy/Lib/lib/lapack.


> Some observations:
> The number of arguments differ wr.t. to complex (C,Z) and real matrices
> (S,D).
> How is this handled with scipy ?
>
>      SUBROUTINE CGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
>     $                   INFO )
>      SUBROUTINE DGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )


See the first signature in flapack_esv.pyf.src that demonstrates how to
deal with such a situation. Basically, you should use
   <_1=,,rwork\,,\2>
instead of
   rwork,
in the argument list of <prefix>geqp3. Check out also the corresponing 
bits in callstatement, callprotoargument are handled in <prefix><sym>ev.


HTH,
Pearu



More information about the SciPy-user mailing list