summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorMichael Seifert <michaelseifert04@yahoo.de>2017-10-13 15:28:07 +0200
committerMichael Seifert <michaelseifert04@yahoo.de>2017-10-13 15:32:18 +0200
commit56a7c290037dd9417dbd6fadb971e98a91feff4e (patch)
tree951f707184d42397b12514dbbea4e5ced96e304e /doc/source
parente64699dcaca9eb0dd97deabae01ffc2884cacbb0 (diff)
downloadnumpy-56a7c290037dd9417dbd6fadb971e98a91feff4e.tar.gz
DOC: Some minor fixes regarding import_array
[skip ci]
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/reference/c-api.array.rst6
-rw-r--r--doc/source/user/c-info.how-to-extend.rst4
2 files changed, 5 insertions, 5 deletions
diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst
index 90bb56b2d..79a886e71 100644
--- a/doc/source/reference/c-api.array.rst
+++ b/doc/source/reference/c-api.array.rst
@@ -3013,7 +3013,7 @@ Importing the API
^^^^^^^^^^^^^^^^^
In order to make use of the C-API from another extension module, the
-``import_array`` () command must be used. If the extension module is
+:c:func:`import_array` function must be called. If the extension module is
self-contained in a single .c file, then that is all that needs to be
done. If, however, the extension module involves multiple files where
the C-API is needed then some additional steps must be taken.
@@ -3034,7 +3034,7 @@ the C-API is needed then some additional steps must be taken.
:c:macro:`PY_ARRAY_UNIQUE_SYMBOL` to some name that will hold the
C-API (*e.g.* myextension_ARRAY_API). This must be done **before**
including the numpy/arrayobject.h file. In the module
- initialization routine you call ``import_array`` (). In addition,
+ initialization routine you call :c:func:`import_array`. In addition,
in the files that do not have the module initialization
sub_routine define :c:macro:`NO_IMPORT_ARRAY` prior to including
numpy/arrayobject.h.
@@ -3115,7 +3115,7 @@ extension with the lowest NPY_FEATURE_VERSION as possible.
it is in the C-API, however, comparing the output of this function from the
value defined in the current header gives a way to test if the C-API has
changed thus requiring a re-compilation of extension modules that use the
- C-API. This is automatically checked in the function import_array.
+ C-API. This is automatically checked in the function :c:func:`import_array`.
.. c:function:: unsigned int PyArray_GetNDArrayCFeatureVersion(void)
diff --git a/doc/source/user/c-info.how-to-extend.rst b/doc/source/user/c-info.how-to-extend.rst
index a8b3de34f..f36cc493b 100644
--- a/doc/source/user/c-info.how-to-extend.rst
+++ b/doc/source/user/c-info.how-to-extend.rst
@@ -56,8 +56,8 @@ order for Python to use it as an extension module. The function must
be called init{name} where {name} is the name of the module from
Python. This function must be declared so that it is visible to code
outside of the routine. Besides adding the methods and constants you
-desire, this subroutine must also contain calls to import_array()
-and/or import_ufunc() depending on which C-API is needed. Forgetting
+desire, this subroutine must also contain calls like ``import_array()``
+and/or ``import_ufunc()`` depending on which C-API is needed. Forgetting
to place these commands will show itself as an ugly segmentation fault
(crash) as soon as any C-API subroutine is actually called. It is
actually possible to have multiple init{name} functions in a single