Fortran to Python
Robert Kern
robert.kern at gmail.com
Fri Jan 4 17:21:21 EST 2008
Jeroen Ruigrok van der Werven wrote:
> I got someone who asked me to make changes in an old Fortran program she is
> using for some calculations.
> The calculations are pretty standard aside from 2 calls to DLINCG (an IMSL
> numerical_libraries function to calculate an inverse matrix).
>
> What I wonder about, does anybody have a Fortran to Python conversion page
> somewhere to map some of the basic types to Python equivalents?
> What kind of speed difference should I expect?
Fairly large, if you insist on avoiding numpy. However, if your inputs are small
enough, it may not matter a whole lot.
You may want to use Raymond Hettinger's Matfunc.py module to implement the
inverse matrices (or preferably, reformulate the problem to use a solver instead
of inverting matrices explicitly):
http://users.rcn.com/python/download/python.htm
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list