2
$\begingroup$

Although interoperability with Fortran could be realised by using LibraryLink (e.g., Linking FORTRAN with Librarylink), the approach is not so straight forward, in particular for those not familiar with C (such as me).

In comparison with LibraryLink, the numpy tool f2py provides a much easier way to generate Python modules from Fortran code given the users have basic knowledge of Fortran. In fact, the intermediate step of f2py also involves C code, which is similar as the LibraryLink approach.

As such, I'm wondering if it's possible for Mathematica to directly use f2py-generated files to create Mathematica functions?

$\endgroup$
2
  • 1
    $\begingroup$ The answer to this question is very likely: No. You should have a look at LTemplate. This requires only rather basic C++ knowledge. $\endgroup$ Commented Aug 20, 2017 at 5:17
  • $\begingroup$ Thanks, @HenrikSchumacher ! The link is very helpful. $\endgroup$
    – sunt05
    Commented Aug 20, 2017 at 5:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.