[f2py] f2py failed for keyword error

Jürgen Wieferink wieferink at freenet.de
Tue Apr 5 16:09:06 EEST 2011


Hi,

Evan Mason wrote (Tuesday 05 April 2011 14:18:02):
[...]
> However, if I add an extra argument (e.g., lr) to the f90
[...]
> so that the pyf is now:
> 
> !    -*- f90 -*-
> ! Note: the context of this file is case sensitive.
> 
> python module testfillnans ! in
>     interface  ! in :testfillnans
>         subroutine testfillnans(lx,rn,cn,lrn,lr) !
>  testfillnans:testfillnans.f90 integer :: lx
>             integer dimension(lrn) :: rn
>             integer dimension(lrn),depend(lrn) :: cn
>             integer optional,check(len(rn)>=lrn),depend(rn) :: lrn=len(rn)
>             integer :: lr
>         end subroutine testfillnans
>     end interface
> end python module testfillnans
> 
> ! This file was auto-generated with f2py (version:1_8464).

It is crucial to see the actual python call in this case.  But
please note that the argument "lrn" is optional and therefore
probably shifted to the right of the argument list.  To be sure, you
should have a look at the generated docstring (np.info(<callable>)).

Best regards,
Juergen



More information about the f2py-users mailing list