Fortran magic's documentation¶

Fortran magic is an IPython extension that help to use fortran code in an interactive session.

It adds a %%fortran cell magic that compile and import the Fortran code in the cell, using F2py.

The contents of the cell are written to a .f90 file in the directory IPYTHONDIR/fortran using a filename with the hash of the code. This file is then compiled. The resulting module is imported and all of its symbols are injected into the user's namespace.

This software was originally sponsored by Phasety

Feedback, report of issues and pull requests are welcome!