[Numpy-discussion] future of f2py and Fortran90+
tim at cerazone.net
Thu Dec 3 20:02:58 EST 2015
On Tue, Jul 14, 2015 at 10:13 PM Sturla Molden <sturla.molden at gmail.com>
> Eric Firing <efiring at hawaii.edu> wrote:
> > I'm curious: has anyone been looking into what it would take to enable
> > f2py to handle modern Fortran in general? And into prospects for
> > getting such an effort funded?
> No need. Use Cython and Fortran 2003 ISO C bindings. That is the only
> portable way to interop between Fortran and C (including CPython) anyway.
For my wdmtoolbox I have a f2py wrapped Fortran 77 library. Works great on
Linux, but because of the 'C' wrapper that f2py creates you run into the
same problem as Cython on Windows.
I guess if you first find a Windows machine, get it all setup, you may not
have to futz with it too much, but I just don't want to do it for such a
niche package. I probably have a handful of users.
So I've been toying with the idea to use ctypes + iso_c_binding. I could
then use MinGW on Windows to compile the code for all versions of Python
that have ctypes. I've tested this approach on a few functions and it
works, but far from done.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion