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

Pearu Peterson pearu at scipy.org
Fri Feb 24 09:00:21 CST 2006



On Fri, 24 Feb 2006, Nils Wagner wrote:

>> Read the headers of ?geqp3.f files where the arguments of related
>> subroutines are explained.
>>
>>
> Sure. I mean the special handling inside the wrapper.
> I found several ways for different routines to declare  _lwork
>
> <_lwork=3*n-1,\0,2*n-1,\2>
>  integer optional,intent(in),depend(n) :: lwork=<_lwork>
>  check(<_lwork>\<=lwork) lwork
>
>     ! <_lwork=(compute_vl||compute_vr)?4*n:3*n,\0,2*n,\2>
>     integer optional,intent(in),depend(n,compute_vl,compute_vr) ::
> lwork=<_lwork>
>     check(lwork>=<_lwork>) :: lwork
>
>     !
> <_lwork=3*minmn+MAX(2*minmn\,MAX(maxmn\,nrhs)),\0,2*minmn+MAX(maxmn\,nrhs),\2>
>     integer optional,intent(in),depend(nrhs,minmn,maxmn), &
>          check(lwork>=1) &
>          :: lwork=<_lwork>
>          !check(lwork>=<_lwork>)
>
> ! <_lwork=n,\0,\0,\0>
>     integer optional,intent(in),depend(n),check(lwork\>=<_lwork>) ::
> lwork=<_lwork>
>     <ftype> dimension(lwork),intent(hide,cache),depend(lwork) :: work
>
>
> Which way is suitable here ?

Read numpy.distutils.from_template.__doc__ about the syntax of <..> 
blocks. And read ?geqp3.f to find out what are proper _lwork values
for each version of geqp3 subroutine.

Pearu



More information about the SciPy-user mailing list