diff options
author | David Cournapeau <cournape@gmail.com> | 2009-11-04 08:56:07 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2009-11-04 08:56:07 +0000 |
commit | 15103d3408418e4ee68e67762ef3f25f1fb00d28 (patch) | |
tree | 172b17f1b3809657d38aa51bf1e1d706d198c59d | |
parent | 5d3f5923425a77ba2fda4e51e731dd7024b7abe5 (diff) | |
download | numpy-15103d3408418e4ee68e67762ef3f25f1fb00d28.tar.gz |
Add an example for using complex npymath stuff.
-rw-r--r-- | doc/source/reference/c-api.coremath.rst | 17 |
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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |