diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2019-01-20 11:54:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-20 11:54:44 -0700 |
commit | 568d0f7483f7b94029d49707ccd6371f9f5c554c (patch) | |
tree | 3e546aae0f0e5d337fd758852b0623c7c1902b4c /doc | |
parent | 2b05f3e38431842ff06df9b2958d22c5a0588767 (diff) | |
parent | d26842f9ce822f32b4c6165aff75d950e400beb8 (diff) | |
download | numpy-568d0f7483f7b94029d49707ccd6371f9f5c554c.tar.gz |
Merge pull request #12807 from mattip/f2py-source-bytes
BUG, DOC: test, fix that f2py.compile accepts str and bytes, rework docs
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/f2py/run_main_session.dat | 2 | ||||
-rw-r--r-- | doc/source/f2py/usage.rst | 29 |
2 files changed, 3 insertions, 28 deletions
diff --git a/doc/source/f2py/run_main_session.dat b/doc/source/f2py/run_main_session.dat index b9a7e1b0d..be6cacd22 100644 --- a/doc/source/f2py/run_main_session.dat +++ b/doc/source/f2py/run_main_session.dat @@ -8,7 +8,7 @@ Post-processing... Building modules... Building module "scalar"... Wrote C/API module "scalar" to file "./scalarmodule.c" ->>> printr(r) +>>> print(r) {'scalar': {'h': ['/home/users/pearu/src_cvs/f2py/src/fortranobject.h'], 'csrc': ['./scalarmodule.c', '/home/users/pearu/src_cvs/f2py/src/fortranobject.c']}} diff --git a/doc/source/f2py/usage.rst b/doc/source/f2py/usage.rst index 0f5068e0e..5043ec430 100644 --- a/doc/source/f2py/usage.rst +++ b/doc/source/f2py/usage.rst @@ -214,32 +214,7 @@ Python module ``numpy.f2py`` The current Python interface to the ``f2py`` module is not mature and may change in the future. -The following functions are provided by the ``numpy.f2py`` module: -``run_main(<list>)`` - Equivalent to running:: +.. automodule:: numpy.f2py + :members: - f2py <args> - - where ``<args>=string.join(<list>,' ')``, but in Python. Unless - ``-h`` is used, this function returns a dictionary containing - information on generated modules and their dependencies on source - files. For example, the command ``f2py -m scalar scalar.f`` can be - executed from Python as follows - - .. include:: run_main_session.dat - :literal: - - You cannot build extension modules with this function, that is, - using ``-c`` is not allowed. Use ``compile`` command instead, see - below. - -``compile(source, modulename='untitled', extra_args='', verbose=1, source_fn=None)`` - Build extension module from Fortran 77 source string ``source``. - Return 0 if successful. - Note that this function actually calls ``f2py -c ..`` from shell to - ensure safety of the current Python process. - For example, - - .. include:: compile_session.dat - :literal: |