[SciPy-user] [f2py] f90 format file...

lorenzo bolla lbolla at gmail.com
Fri Jul 6 06:13:58 EDT 2007


gotcha. I suspect you are using the wrong "comment" in the .f90 file, then.
you use:
!!!f2py
and you should use:
!f2py

with !!!f2py the directive is not read and KM is not "intent(out)", i.e.,
the subroutine returns None. see the signature of the subroutine below, as
parsed by f2py:
------
Building modules...
        Building module "test"...
                Constructing wrapper function "calc_km"...
                  calc_km(km,[nx,ny,nz])
        Wrote C/API module "test" to file "/tmp/tmp0yiO43/src.linux-ia64-2.5
/testmodule.c"
------

with !f2py the directive intent(out) is read and the function is correctly
parsed, and returns KM:
 ------
Building modules...
        Building module "test"...
                Constructing wrapper function "calc_km"...
                  km = calc_km(km)
        Wrote C/API module "test" to file "/tmp/tmpDYUhc6/src.linux-ia64-2.5
/testmodule.c"

------


lorenzo









On 7/6/07, fred <fredmfp at gmail.com> wrote:
>
> lorenzo bolla a écrit :
> > quite strange. it doesn't happen to me. here is what I get
> >
> I notice you use python 2.5.
> I use python 2.4.
> > what is the exact error message you get?
> I don't get error message.
> With test_f90, I get KM = None.
> With test_f, I get the right result.
>
> --
> http://scipy.org/FredericPetit
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20070706/2eab6789/attachment.html>


More information about the SciPy-User mailing list