summaryrefslogtreecommitdiff
path: root/doc/source/f2py/signature-file.rst
diff options
context:
space:
mode:
authorRohit Goswami <rog32@hi.is>2021-09-20 16:17:05 +0000
committerRohit Goswami <rog32@hi.is>2021-09-20 18:36:04 +0000
commit5126bb8f4f9178978f8ce0b4d1bb94a04e338f38 (patch)
treed7a44cc0f3d154eedb804dee5b13f5d10ec45fef /doc/source/f2py/signature-file.rst
parent8ee4592a93dc610e4cea72a9cbc882732de77d87 (diff)
downloadnumpy-5126bb8f4f9178978f8ce0b4d1bb94a04e338f38.tar.gz
DOC: Address reviewer comments
Diffstat (limited to 'doc/source/f2py/signature-file.rst')
-rw-r--r--doc/source/f2py/signature-file.rst31
1 files changed, 16 insertions, 15 deletions
diff --git a/doc/source/f2py/signature-file.rst b/doc/source/f2py/signature-file.rst
index 085590d53..b80b31509 100644
--- a/doc/source/f2py/signature-file.rst
+++ b/doc/source/f2py/signature-file.rst
@@ -9,8 +9,8 @@ is a subset of Fortran 90/95). F2PY introduces some extensions to the Fortran
90/95 language specification that help in the design of the Fortran to Python
interface, making it more "Pythonic".
-Signature files may contain arbitrary Fortran code (so that any Fortran 90/95
-codes can be treated as signature files). F2PY silently ignores
+Signature files may contain arbitrary Fortran code so that any Fortran 90/95
+codes can be treated as signature files. F2PY silently ignores
Fortran constructs that are irrelevant for creating the interface.
However, this also means that syntax errors are not caught by F2PY and will only
be caught when the library is built.
@@ -32,9 +32,9 @@ generates.
.. warning::
- Exception: if ``<modulename>`` contains a substring ``__user__``, then
- the corresponding ``python module`` block describes the signatures of
- so-called call-back functions (see :ref:`Call-back arguments`).
+ Exception: if ``<modulename>`` contains a substring ``__user__``, then the
+ corresponding ``python module`` block describes the signatures of call-back
+ functions (see :ref:`Call-back arguments`).
A ``python module`` block has the following structure::
@@ -59,7 +59,7 @@ A ``python module`` block has the following structure::
Here brackets ``[]`` indicate an optional section, dots ``...`` indicate one or
more of a previous section. So, ``[]...`` is to be read as zero or more of a
-previous part.
+previous section.
Fortran/C routine signatures
@@ -246,12 +246,12 @@ Other statements
.. note::
- Tip: The ``entry`` statement can be used to describe the signature
- of an arbitrary routine allowing F2PY to generate a number of
+ The ``entry`` statement can be used to describe the signature of an
+ arbitrary subroutine or function allowing F2PY to generate a number of
wrappers from only one routine block signature. There are few
restrictions while doing this: ``fortranname`` cannot be used,
- ``callstatement`` and ``callprotoargument`` can be used only if
- they are valid for all entry routines, etc.
+ ``callstatement`` and ``callprotoargument`` can be used only if they are
+ valid for all entry routines, etc.
F2PY statements
^^^^^^^^^^^^^^^^
@@ -510,9 +510,10 @@ The following attributes are used by F2PY:
.. note::
- If ``check(..)`` is not used then F2PY generates a few standard checks (e.g.
- in a case of an array argument, it checks for the proper shape and size)
- automatically. Use ``check()`` to disable checks generated by F2PY.
+ If ``check(..)`` is not used then F2PY automatically generates a few
+ standard checks (e.g. in a case of an array argument, it checks for the
+ proper shape and size). Use ``check()`` to disable checks
+ generated by F2PY.
``depend([<names>])``
This declares that the corresponding argument depends on the values
@@ -537,7 +538,7 @@ The following attributes are used by F2PY:
``external``
The corresponding argument is a function provided by user. The
- signature of this so-called call-back function can be defined
+ signature of this call-back function can be defined
- in ``__user__`` module block,
- or by demonstrative (or real, if the signature file is a real Fortran
@@ -590,7 +591,7 @@ Extensions
F2PY directives
^^^^^^^^^^^^^^^^
-The so-called F2PY directives allow using F2PY signature file constructs in
+The F2PY directives allow using F2PY signature file constructs in
Fortran 77/90 source codes. With this feature one can (almost) completely skip
the intermediate signature file generation and apply F2PY directly to Fortran
source codes.