summaryrefslogtreecommitdiff
path: root/doc/source/reference/random/examples
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-11-19 07:44:44 -0700
committerCharles Harris <charlesr.harris@gmail.com>2019-11-19 07:44:44 -0700
commitd6ecf67f88fb61cf641e2370d3e54938232de09d (patch)
tree08223e6b70fd71d0b11d378ca02f96d56c715d74 /doc/source/reference/random/examples
parent53201578225cc89d383738598acec03572554019 (diff)
downloadnumpy-d6ecf67f88fb61cf641e2370d3e54938232de09d.tar.gz
API: restructure and document numpy.random C-API (#14604)
* API: restructure and document numpy.random C-API * DOC: fix bad reference * API: ship, document, and start to test numpy.random C-API examples * API, DOC, TST: fix tests, refactor documentation to include snippets * BUILD: move public headers to numpy/core/include/numpy/random * TST: ignore DeprecationWarnings in setuptools and numba * DOC: document the C-API as used from Cython
Diffstat (limited to 'doc/source/reference/random/examples')
-rw-r--r--doc/source/reference/random/examples/cython/extending.pyx4
-rw-r--r--doc/source/reference/random/examples/cython/extending.pyx.rst5
-rw-r--r--doc/source/reference/random/examples/cython/extending_distributions.pyx.rst5
-rw-r--r--doc/source/reference/random/examples/cython/index.rst9
-rw-r--r--doc/source/reference/random/examples/cython/setup.py.rst5
-rw-r--r--doc/source/reference/random/examples/numba.rst5
-rw-r--r--doc/source/reference/random/examples/numba_cffi.rst5
7 files changed, 38 insertions, 0 deletions
diff --git a/doc/source/reference/random/examples/cython/extending.pyx b/doc/source/reference/random/examples/cython/extending.pyx
new file mode 100644
index 000000000..0cfbc146f
--- /dev/null
+++ b/doc/source/reference/random/examples/cython/extending.pyx
@@ -0,0 +1,4 @@
+extending.pyx
+-------------
+
+.. include:: ../../../../../../numpy/random/examples/extending.pyx
diff --git a/doc/source/reference/random/examples/cython/extending.pyx.rst b/doc/source/reference/random/examples/cython/extending.pyx.rst
new file mode 100644
index 000000000..bc31488d7
--- /dev/null
+++ b/doc/source/reference/random/examples/cython/extending.pyx.rst
@@ -0,0 +1,5 @@
+extending.pyx
+-------------
+
+.. literalinclude:: ../../../../../../numpy/random/examples/cython/extending.pyx
+ :language: cython
diff --git a/doc/source/reference/random/examples/cython/extending_distributions.pyx.rst b/doc/source/reference/random/examples/cython/extending_distributions.pyx.rst
new file mode 100644
index 000000000..a1bb01f45
--- /dev/null
+++ b/doc/source/reference/random/examples/cython/extending_distributions.pyx.rst
@@ -0,0 +1,5 @@
+extending_distributions.pyx
+---------------------------
+
+.. literalinclude:: ../../../../../../numpy/random/examples/cython/extending_distributions.pyx
+ :language: cython
diff --git a/doc/source/reference/random/examples/cython/index.rst b/doc/source/reference/random/examples/cython/index.rst
new file mode 100644
index 000000000..9c5da9559
--- /dev/null
+++ b/doc/source/reference/random/examples/cython/index.rst
@@ -0,0 +1,9 @@
+
+Extending `numpy.random` via Cython
+-----------------------------------
+
+
+.. toctree::
+ setup.py.rst
+ extending.pyx
+ extending_distributions.pyx
diff --git a/doc/source/reference/random/examples/cython/setup.py.rst b/doc/source/reference/random/examples/cython/setup.py.rst
new file mode 100644
index 000000000..381b45fd4
--- /dev/null
+++ b/doc/source/reference/random/examples/cython/setup.py.rst
@@ -0,0 +1,5 @@
+setup.py
+--------
+
+.. literalinclude:: ../../../../../../numpy/random/examples/cython/setup.py
+ :language: python
diff --git a/doc/source/reference/random/examples/numba.rst b/doc/source/reference/random/examples/numba.rst
new file mode 100644
index 000000000..a780afde7
--- /dev/null
+++ b/doc/source/reference/random/examples/numba.rst
@@ -0,0 +1,5 @@
+Extending via Numba
+-------------------
+
+.. literalinclude:: ../../../../../numpy/random/examples/numba/extending.py
+ :language: python
diff --git a/doc/source/reference/random/examples/numba_cffi.rst b/doc/source/reference/random/examples/numba_cffi.rst
new file mode 100644
index 000000000..ad4767a7a
--- /dev/null
+++ b/doc/source/reference/random/examples/numba_cffi.rst
@@ -0,0 +1,5 @@
+Extending via Numba and CFFI
+----------------------------
+
+.. literalinclude:: ../../../../../numpy/random/examples/numba/extending_distributions.py
+ :language: python