[Numpy-discussion] [ANN] Cython 0.15

Dag Sverre Seljebotn d.s.seljebotn@astro.uio...
Sun Aug 7 16:24:42 CDT 2011


On 08/07/2011 10:31 PM, Paul Anton Letnes wrote:
> Looks like you have done some great work! I've been using f2py in the past, but I always liked the idea of cython - gradually wrapping more and more code as the need arises. I read somewhere that fortran wrapping with cython was coming - dare I ask what the status on this is? Is it a goal for cython to support easy fortran wrapping at all?

Fwrap scans Fortran sources and generate a Cython wrapper around a 
iso_c_binding Fortran 2003 wrapper around your Fortran code. Which is a 
bit more portable than f2py in theory, although it's pretty much the 
same in practice currently.

It doesn't work for all Fortran code, but I think it works for what f2py 
does and then some more.

The big difference is that it allows you to sidestep Python boxing of 
arguments when calling from Cython.

In addition to the main website (use Google) there's been quite a lot 
more work on it my Github:

https://github.com/dagss/fwrap

that's not released. I'd like to continue on Fwrap but there's always 
2-3 items higher on the priority list. I can't tell you yet whether the 
project will survive.

But anyway, this is the way Fortran+Cython is supported.

Dag Sverre


More information about the NumPy-Discussion mailing list