2-4 July 2020
University of Zurich
Europe/Zurich timezone

F2PY: Bringing fast code into the future

3 Jul 2020, 20:00
ZOOM (University of Zurich)


University of Zurich

Junior Presentations Session G


Dr Melissa Weber Mendonça (Quansight)


F2PY is a tool (authored by Pearu Peterson in 1999) to generate custom CPython
extension modules to interface high-performance Fortran or C libraries to high-level Python code. The F2PY tool, currently packaged with NumPy, is one of the most fundamental packages in the scientific Python ecosystem. On the other hand, F2PY has not kept up with modern Fortran standards, as evidenced by the lack of support for user-defined types or derived types, for example. Adding these new features will improve significantly the applicability range of F2PY to interfacing modern Fortran libraries to Python code. Since Fortran is often, but unfairly, considered a niche programming language, finding contributors and building a community around this package has proven difficult, in spite of its importance and relevance in modern scientific code.

In this talk, we will discuss the current status of the F2PY project and possible ways forward. This will include a discussion on how to create extension modules and F2PY's approach to doing this, with concrete examples for those unfamiliar with the tool. In addition, we will discuss current efforts to modernize this tool to extend its capabilities and make sure that projects that depend on it are supported in the future.

Primary authors

Dr Melissa Weber Mendonça (Quansight) Dr Pearu Peterson (Quansight)

Presentation Materials