[Numpy-discussion] A quick f2py question

Fernando Perez fperez.net@gmail....
Wed Dec 5 12:38:34 CST 2007


Hi all,

I have a quick question on f2py.  I have a fortran lib I've wrapped
for a while and was updating one routine today, when I noticed a
message I'm curious about.  The .pyf file contains this signature:

        subroutine
createblocks(nnod,ll,nscale,nterms,pp,qq,aoffset,iflag,rintphi,rnorm)
! in :mwrep:createblocks.f
            integer intent(in) :: nnod
            integer intent(in) :: ll
	    integer intent(in) :: nscale
	    integer intent(hide),depend(pp) :: nterms = len(pp)
            real*8 dimension(nterms),intent(in) :: pp
            real*8 dimension(nterms),intent(in) :: qq
            real*8 dimension(nterms),intent(in) :: aoffset
            integer intent(in) :: iflag
            real*8
dimension(nterms*nnod*nnod),intent(out),depend(nterms,nnod) :: rintphi
	    real*8 dimension(nterms),intent(out),depend(nterms):: rnorm
        end subroutine createblocks

And I see this message in the build:

In: mwrep.pyf:mwrep:unknown_interface:createblocks
_get_depend_dict: no dependence info for 'len'

The build does actually continue, and in the end, this routine seems
to be correctly wrapped.  But I still worry that it may be getting the
right allocations by chance/accident.  Is this a real error message,
or just an internal warning from an intermediate pass?  Or has the
call for len() changed recently in f2py? (this code was originally
wrapped years ago, now I'm just doing minor updates).

Thanks for any info...

Cheers,

f


More information about the Numpy-discussion mailing list