Types from Fortran to Python via Opaque Pointers
An exploration of the opaque object and pointer interface approach to unleash more modern features than those offered by the ISO Fortran standard.
Background # Since this has been covered a few times before, just some quick pointers1. The ultimate context is to be able take nice, modern Fortran code with derived types and generate equally nice, user friendly, efficient Python wrappers via f2py.
Why? # Where the last post (and the test implementation in f2py) left off, the type shadowing approach for having exactly interoperable bind(c) derived types (and functions) was covered. However, there are several aspects of derived types which cannot be covered (“deep” types in the nomenclature of Pletzer et al. (2008)). A brief list:
Rohit Goswami