F2PY rulez!

I recently found some old Fortran code from the paper Algorithm AS197 A Fast Algorithm for the Exact Likelihood of Autoregressive-Moving Average Models (Melard 1984) [pdf] [code].

I’m not very fluent in Fortran77 and I don’t like the idea of rewriting a well tested piece of code introducing new bugs, so why not give a try to F2PY?

F2PY is a tool that provides an easy connection between Python and Fortran languages. F2PY is part of NumPy.
F2PY creates extension modules from (handwritten or F2PY generated) signature files or directly from Fortran sources.

Continue…