summaryrefslogtreecommitdiff
path: root/doc/source/f2py/python-usage.rst
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2014-01-03 00:02:11 +0200
committerPauli Virtanen <pav@iki.fi>2014-01-03 00:13:38 +0200
commit4f7d1019f2b4313ae2a5a601fb09fcaabbd9c952 (patch)
treea9239b8723aa56cf5c0da2c422cd4bc146cf384d /doc/source/f2py/python-usage.rst
parent3b3a531f9564d5696b3a50d41636b58d65ba1330 (diff)
downloadnumpy-4f7d1019f2b4313ae2a5a601fb09fcaabbd9c952.tar.gz
DOC: f2py: fix some typos etc
Diffstat (limited to 'doc/source/f2py/python-usage.rst')
-rw-r--r--doc/source/f2py/python-usage.rst28
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/source/f2py/python-usage.rst b/doc/source/f2py/python-usage.rst
index 179df54d8..83454c440 100644
--- a/doc/source/f2py/python-usage.rst
+++ b/doc/source/f2py/python-usage.rst
@@ -144,7 +144,7 @@ and C-contiguous if the order is as follows::
A[0,0] A[0,1] A[1,0] A[1,1]
To test whether an array is C-contiguous, use ``.iscontiguous()``
-method of Numpy arrays. To test for Fortran-contiguousness, all
+method of Numpy arrays. To test for Fortran contiguity, all
F2PY generated extension modules provide a function
``has_column_major_storage(<array>)``. This function is equivalent to
``<array>.flags.f_contiguous`` but more efficient.
@@ -155,7 +155,7 @@ functions, assume one or another storage order. F2PY automatically
ensures that wrapped functions get arguments with proper storage
order; the corresponding algorithm is designed to make copies of
arrays only when absolutely necessary. However, when dealing with very
-large multi-dimensional input arrays with sizes close to the size of
+large multidimensional input arrays with sizes close to the size of
the physical memory in your computer, then a care must be taken to use
always proper-contiguous and proper type arguments.
@@ -269,14 +269,14 @@ routines so that Python functions could be called from Fortran.
:literal:
The function is included as an argument to the python function call to
-the FORTRAN subroutine eventhough it was NOT in the FORTRAN subroutine argument
+the Fortran subroutine even though it was *not* in the Fortran subroutine argument
list. The "external" refers to the C function generated by f2py, not the python
function itself. The python function must be supplied to the C function.
The callback function may also be explicitly set in the module.
Then it is not necessary to pass the function in the argument list to
-the FORTRAN function. This may be desired if the FORTRAN function calling
-the python callback function is itself called by another FORTRAN function.
+the Fortran function. This may be desired if the Fortran function calling
+the python callback function is itself called by another Fortran function.
.. example::
@@ -327,20 +327,20 @@ is provided by an user, and in addition,
is used, then the following rules are applied when a Fortran or C
function calls the call-back argument ``gun``:
-* If ``p==0`` then ``gun(a_1,...,a_q)`` is called, here
- ``q=min(m,n)``.
-* If ``n+p<=m`` then ``gun(a_1,...,a_n,e_1,...,e_p)`` is called.
-* If ``p<=m<n+p`` then ``gun(a_1,...,a_q,e_1,...,e_p)`` is called, here
+* If ``p == 0`` then ``gun(a_1, ..., a_q)`` is called, here
+ ``q = min(m, n)``.
+* If ``n + p <= m`` then ``gun(a_1, ..., a_n, e_1, ..., e_p)`` is called.
+* If ``p <= m < n + p`` then ``gun(a_1, ..., a_q, e_1, ..., e_p)`` is called, here
``q=m-p``.
-* If ``p>m`` then ``gun(e_1,...,e_m)`` is called.
-* If ``n+p`` is less than the number of required arguments to ``gun``
+* If ``p > m`` then ``gun(e_1, ..., e_m)`` is called.
+* If ``n + p`` is less than the number of required arguments to ``gun``
then an exception is raised.
The function ``gun`` may return any number of objects as a tuple. Then
following rules are applied:
-* If ``k<l``, then ``y_{k+1},...,y_l`` are ignored.
-* If ``k>l``, then only ``x_1,...,x_l`` are set.
+* If ``k < l``, then ``y_{k + 1}, ..., y_l`` are ignored.
+* If ``k > l``, then only ``x_1, ..., x_l`` are set.
@@ -354,7 +354,7 @@ with the current extension module, but not to other extension modules
Python, the F2PY wrappers to ``common`` blocks are ``fortran`` type
objects that have (dynamic) attributes related to data members of
common blocks. When accessed, these attributes return as Numpy array
-objects (multi-dimensional arrays are Fortran-contiguous) that
+objects (multidimensional arrays are Fortran-contiguous) that
directly link to data members in common blocks. Data members can be
changed by direct assignment or by in-place changes to the
corresponding array objects.