Pregunta

There are several version of Fortran (66, 77, 90, 95, 2003, 2008) and there are two versions of CPython (2.x and 3.x).

From user experience I would like to know whether f2py is faster, more memory efficient or robust when writing the Fortran source code in a specific version.

Secondly, does f2py support Python 3.x and if so does it perform better for 2.x or 3.x?

¿Fue útil?

Solución

From my experience, and the documentation it is not f2py that makes the difference - it is your or the final users Fortran compiler - f2py generates a wrapper not compiles the code itself. For those Fortran dialects that are not mentioned i.e. 90, 2003 & 2008 as specifically supported you may, (depending on the features that your code uses), have to generate the interfaces yourself.

I have not tried f2py under python 3 but the current numpy notes suggest that most packages are available. Again it will be the Fortran compiler that will determine the speed and memory footprint of the extension.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top