summaryrefslogtreecommitdiff
path: root/doc/source/f2py/python-usage.rst
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2014-01-02 23:19:54 +0200
committerPauli Virtanen <pav@iki.fi>2014-01-02 23:19:54 +0200
commit6325f92017337b0b0e340689959eba465c8dbd94 (patch)
tree3c1fbb666c5d0634eae8e6be99b93385b4596565 /doc/source/f2py/python-usage.rst
parent337366c6d512b47e6a702d18a3f3f6240c3fda4a (diff)
downloadnumpy-6325f92017337b0b0e340689959eba465c8dbd94.tar.gz
DOC: f2py: Numeric -> numpy
Diffstat (limited to 'doc/source/f2py/python-usage.rst')
-rw-r--r--doc/source/f2py/python-usage.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/source/f2py/python-usage.rst b/doc/source/f2py/python-usage.rst
index 24ec3f15d..809634b40 100644
--- a/doc/source/f2py/python-usage.rst
+++ b/doc/source/f2py/python-usage.rst
@@ -76,7 +76,7 @@ String arguments
F2PY generated wrapper functions accept (almost) any Python object as
a string argument, ``str`` is applied for non-string objects.
-Exceptions are Numeric arrays that must have type code ``'c'`` or
+Exceptions are Numpy arrays that must have type code ``'c'`` or
``'1'`` when used as string arguments.
A string can have arbitrary length when using it as a string argument
@@ -109,7 +109,7 @@ Array arguments
================
In general, array arguments of F2PY generated wrapper functions accept
-arbitrary sequences that can be transformed to Numeric array objects.
+arbitrary sequences that can be transformed to Numpy array objects.
An exception is ``intent(inout)`` array arguments that always must be
proper-contiguous and have proper type, otherwise an exception is
raised. Another exception is ``intent(inplace)`` array arguments that
@@ -117,13 +117,13 @@ attributes will be changed in-situ if the argument has different type
than expected (see ``intent(inplace)`` attribute for more
information).
-In general, if a Numeric array is proper-contiguous and has a proper
+In general, if a Numpy array is proper-contiguous and has a proper
type then it is directly passed to wrapped Fortran/C function.
Otherwise, an element-wise copy of an input array is made and the
copy, being proper-contiguous and with proper type, is used as an
array argument.
-There are two types of proper-contiguous Numeric arrays:
+There are two types of proper-contiguous Numpy arrays:
* Fortran-contiguous arrays when data is stored column-wise,
i.e. indexing of data as stored in memory starts from the lowest
@@ -144,10 +144,10 @@ 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 Numeric arrays. To test for Fortran-contiguousness, all
+method of Numpy arrays. To test for Fortran-contiguousness, all
F2PY generated extension modules provide a function
``has_column_major_storage(<array>)``. This function is equivalent to
-``Numeric.transpose(<array>).iscontiguous()`` but more efficient.
+``<array>.flags.f_contiguous`` but more efficient.
Usually there is no need to worry about how the arrays are stored in
memory and whether the wrapped functions, being either Fortran or C
@@ -353,7 +353,7 @@ with the current extension module, but not to other extension modules
(this restriction is due to how Python imports shared libraries). In
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 Numeric array
+common blocks. When accessed, these attributes return as Numpy array
objects (multi-dimensional 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