Module | __main__ |
Undocumented |
Module | __version__ |
Undocumented |
Module | auxfuncs |
Auxiliary functions for f2py2e. |
Module | capi_maps |
No summary |
Module | cb_rules |
Build call-back mechanism for f2py2e. |
Module | cfuncs |
C declarations, CPP macros, and C functions for f2py2e. Only required declarations/macros/functions will be used. |
Module | common_rules |
Build common block mechanism for f2py2e. |
Module | crackfortran |
crackfortran --- read fortran (77,90) code and extract declaration information. |
Module | diagnose |
Undocumented |
Module | f2py2e |
f2py2e - Fortran to Python C/API generator. 2nd Edition. See __usage__ below. |
Module | f2py_testing |
Undocumented |
Module | f90mod_rules |
Build F90 module support for f2py2e. |
Module | func2subr |
Rules for building C/API module with f2py2e. |
Module | rules |
Rules for building C/API module with f2py2e. |
Module | setup |
setup.py for installing F2PY |
Module | symbolic |
Fortran/C symbolic expressions |
Package | tests |
No package docstring; 3/24 modules documented |
Module | use_rules |
Build 'use others module data' mechanism for f2py2e. |
From __init__.py
:
Function | compile |
Build extension module from a Fortran 77 source string with f2py. |
Function | get_include |
Return the directory that contains the fortranobject.c and .h files. |
Function | __dir__ |
Undocumented |
Function | __getattr__ |
Undocumented |
Build extension module from a Fortran 77 source string with f2py.
Fortran source of module / subroutine to compile
Additional parameters passed to f2py
extension
parameterFilename extension if source_fn
is not provided.
The extension tells which fortran standard is used.
The default is .f
, which implies F77 standard.
If True, return a subprocess.CompletedProcess
containing
the stdout and stderr of the compile process, instead of just
the status code.
subprocess.CompletedProcess
subprocess.CompletedProcess
if
full_output=TrueReturn the directory that contains the fortranobject.c and .h files.
Note
This function is not needed when building an extension with
numpy.distutils
directly from .f and/or .pyf files
in one go.
Python extension modules built with f2py-generated code need to use fortranobject.c as a source file, and include the fortranobject.h header. This function can be used to obtain the directory containing both of these files.
Unless the build system you are using has specific support for f2py, building a Python extension using a .pyf signature file is a two-step process. For a module mymod:
Step 1: run python -m numpy.f2py mymod.pyf --quiet. This generates _mymodmodule.c and (if needed) _fblas-f2pywrappers.f files next to mymod.pyf.
Step 2: build your Python extension module. This requires the following source files:
- _mymodmodule.c
- _mymod-f2pywrappers.f (if it was generated in step 1)
- fortranobject.c
numpy.get_include : function that returns the numpy include directory