Is there any standard module or way to convert a Fortran program into Python program or vice versa? For example, I want a cubic spline interpolation done in Fortran to be converted into a Python program( I know I can use sci py for cubic spline but I just want to convert small blocks). Is it possible using any module or do I have to code manually for it?
Asked
Active
Viewed 1,004 times
0
-
There is little reason to convert. The result would be slow. We normally call Fortran from Python. E.g., using [tag:f2py]. – Vladimir F Героям слава Dec 05 '21 at 22:49
-
We also have an old question about the other direction. Unanswered: https://stackoverflow.com/questions/57380883/is-there-a-fast-way-to-convert-a-package-writtten-in-python-to-fortran-90 – Vladimir F Героям слава Dec 05 '21 at 23:01
-
Another question is calling Python from Fortran for scripting. A complicated ropic, but there are some libfaries that make it somewhat easier https://stackoverflow.com/questions/17075418/embed-python-into-fortran-90 – Vladimir F Героям слава Dec 05 '21 at 23:03