diff options
author | Rohit Goswami <rog32@hi.is> | 2022-10-10 16:00:08 +0200 |
---|---|---|
committer | Rohit Goswami <rog32@hi.is> | 2022-10-10 16:00:08 +0200 |
commit | eec7fdf0c35babf65c808ca7d96b50efa3b4888c (patch) | |
tree | bbf136930d982610d7dbacdc08892c96a3532b25 /doc/source/f2py | |
parent | 72f573c9c71092ff3ed59f7818f1b178cb5c6deb (diff) | |
download | numpy-eec7fdf0c35babf65c808ca7d96b50efa3b4888c.tar.gz |
DOC: Add reference links and switch to PyCapsule
Diffstat (limited to 'doc/source/f2py')
-rw-r--r-- | doc/source/f2py/python-usage.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/source/f2py/python-usage.rst b/doc/source/f2py/python-usage.rst index dbcf11d2b..f004a1f75 100644 --- a/doc/source/f2py/python-usage.rst +++ b/doc/source/f2py/python-usage.rst @@ -15,12 +15,12 @@ Routine wrappers are callable ``fortran`` type objects while wrappers to Fortran data have attributes referring to data objects. All ``fortran`` type objects have an attribute ``_cpointer`` that contains a -``Capsule`` referring to the C pointer of the corresponding Fortran/C function -or variable at the C level. Such ``Capsule`` objects can be used as callback +``PyCapsule`` referring to the C pointer of the corresponding Fortran/C function +or variable at the C level. Such ``PyCapsule`` objects can be used as callback arguments for F2PY generated functions to bypass the Python C/API layer for calling Python functions from Fortran or C. This can be useful when the computational aspects of such functions are implemented in C or Fortran and -wrapped with F2PY (or any other tool capable of providing the ``Capsule`` +wrapped with F2PY (or any other tool capable of providing the ``PyCapsule`` containing a function). Consider a Fortran 77 file ```ftype.f``: |