summaryrefslogtreecommitdiff
path: root/doc/source/reference/c-api
diff options
context:
space:
mode:
authorPierre de Buyl <pdebuyl@pdebuyl.be>2020-03-06 16:27:43 +0100
committerGitHub <noreply@github.com>2020-03-06 17:27:43 +0200
commit2c36dbbd6dd13b449c43dca85493f94022f19f9d (patch)
treeb3c6a2b39efac2cb812c8e80d058a4cbbec4bf36 /doc/source/reference/c-api
parent5db7e2e6f805c180a0f117c6faa204f757b512ca (diff)
downloadnumpy-2c36dbbd6dd13b449c43dca85493f94022f19f9d.tar.gz
DOC: Fix coremath.rst to fix refguide_check (#15718)
* DOC: fix coremath.rst to fix refguide_check Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Diffstat (limited to 'doc/source/reference/c-api')
-rw-r--r--doc/source/reference/c-api/coremath.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/source/reference/c-api/coremath.rst b/doc/source/reference/c-api/coremath.rst
index 4200f4ba8..0c46475cf 100644
--- a/doc/source/reference/c-api/coremath.rst
+++ b/doc/source/reference/c-api/coremath.rst
@@ -249,9 +249,14 @@ Linking against the core math library in an extension
To use the core math library in your own extension, you need to add the npymath
compile and link options to your extension in your setup.py:
+ .. hidden in a comment so as to be included in refguide but not rendered documentation
+ >>> import numpy.distutils.misc_util
+ >>> config = np.distutils.misc_util.Configuration(None, '', '.')
+ >>> with open('foo.c', 'w') as f: pass
+
>>> from numpy.distutils.misc_util import get_info
>>> info = get_info('npymath')
- >>> config.add_extension('foo', sources=['foo.c'], extra_info=info)
+ >>> _ = config.add_extension('foo', sources=['foo.c'], extra_info=info)
In other words, the usage of info is exactly the same as when using blas_info
and co.