summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-11-04 08:56:07 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-11-04 08:56:07 +0000
commit15103d3408418e4ee68e67762ef3f25f1fb00d28 (patch)
tree172b17f1b3809657d38aa51bf1e1d706d198c59d /doc
parent5d3f5923425a77ba2fda4e51e731dd7024b7abe5 (diff)
downloadnumpy-15103d3408418e4ee68e67762ef3f25f1fb00d28.tar.gz
Add an example for using complex npymath stuff.
Diffstat (limited to 'doc')
-rw-r--r--doc/source/reference/c-api.coremath.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/source/reference/c-api.coremath.rst b/doc/source/reference/c-api.coremath.rst
index b1a356551..e86214b49 100644
--- a/doc/source/reference/c-api.coremath.rst
+++ b/doc/source/reference/c-api.coremath.rst
@@ -127,6 +127,23 @@ precision are also available by adding the F and L suffixes respectively.
The Euler constant (:math:`\lim_{n\rightarrow \infty}{\sum_{k=1}^n{\frac{1}{k}} - \ln n}`)
+Complex functions
+~~~~~~~~~~~~~~~~~
+
+.. versionadded:: 1.4.0
+
+C99-like complex functions have been added. Those can be used if you wish to
+implement portable C extensions. Since we still support platforms without C99
+complex type, you need to restrict to C90-compatible syntax, e.g.:
+
+.. code-block:: c
+
+ /* a = 1 + 2i \*/
+ npy_complex a = npy_cpack(1, 2);
+ npy_complex b;
+
+ b = npy_log(a);
+
Linking against the core math library in an extension
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~