diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2007-07-27 12:33:50 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2007-07-27 12:33:50 +0000 |
commit | 0b607334bef559e3c822974e4145f3fd0865e687 (patch) | |
tree | 3efec58e47237e4b3b7645b1bceda301c8c8de8b /numpy | |
parent | a39ebbcee92b6e5572d3159bf50126213e6bf887 (diff) | |
download | numpy-0b607334bef559e3c822974e4145f3fd0865e687.tar.gz |
Added doc file for the g3 f2py library package.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/f2py/lib/doc.txt | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/numpy/f2py/lib/doc.txt b/numpy/f2py/lib/doc.txt new file mode 100644 index 000000000..45f149bf7 --- /dev/null +++ b/numpy/f2py/lib/doc.txt @@ -0,0 +1,60 @@ +.. -*- rest -*- + +======================= +G3 F2PY library package +======================= + +:Author: + Pearu Peterson <pearu.peterson@gmail.com> +:Created: July 2007 + +.. contents:: Table of Contents + +Overview +======== + +The G3 F2PY library package contains tools to parse Fortran codes and +construct Python C/API extension modules for wrapping Fortran +programs. These tools are also suitable for implementing Fortran +program translators or wrappers to any other programming language. In +fact, wrapping Fortran programs to Python would be one example of +using these tools. + +Wrapping Fortran with Python +============================ + +There are two user interfaces to wrap Fortran programs with +Python: + + - the command line program `f2py` that scans Fortran files + given as command line arguments and builds extension modules + that can be used to call Fortran programs from Python. + The `f2py` program has four different ways of building + extension modules as specified with the following command + line flags: + + - `--g3-numpy` --- create extension modules with NumPy array + support using the new tools from `the 3rd generation of F2PY`__. + This is a work-in-progress feature. + + - `--2d-numpy` --- create extension modules with NumPy array + support using `the stable version of F2PY`__. This is default. + + - `--2d-numeric` --- create extension modules with Numeric + array support using the old version of f2py2e. The f2py2e + package must be downloaded and installed separately from + the `f2py2e homepage`__. + + - `--2d-numarray` --- create extension modules with Numarray + array support using the old version of f2py2e. + + See the output of `f2py` for more information. + +__ http://projects.scipy.org/scipy/numpy/wiki/G3F2PY/ +__ http://www.scipy.org/F2py/ +__ http://cens.ioc.ee/projects/f2py2e/ + + - the function `compile()` that scans its string input containing + Fortran code and returns a list of imported extension modules + that can be used to call Fortran programs from Python. + |