Fortran and Python

Fortran is a general-purpose, imperative programming language that is especially suited to numeric computation and scientific computing. It was once the dominating programming language in numerical intensive fields, such as physics, mechanics, chemistry and high-performance computing. To make use of the code developed in Fortran, it is prudent to integrate the code into other languages. One integration approach is to us f2py to integrate it into Python.

Course Content

In this course we will give an introduction to f2py in Python. We will go through how header files in Fortran can be used create a connection to create modules in Python. The course will also show how to integrate other languages as well.

Prerequisite

This course requires some familiarity with the Python programming language, introduced here.

Duration: 1 hours

Tools Introduced

F2Py
f2py is an interface generator that provides a connection between Python and Fortran. It is a Python extension tool for creating Python C/API modules from signature files.