summaryrefslogtreecommitdiff
path: root/doc/source/reference/random
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-12-04 07:59:22 +0200
committermattip <matti.picus@gmail.com>2019-12-04 08:52:49 +0200
commit47fbdc1f8c9ed7ec79dfc7cdbb1affd453e84997 (patch)
treefabeb541d46622f1b593a128fb0b4a1afd4c3653 /doc/source/reference/random
parentbd1adc3b6bb97e0fceada63617eb91fccc97f3ec (diff)
downloadnumpy-47fbdc1f8c9ed7ec79dfc7cdbb1affd453e84997.tar.gz
API, DOC: change names to multivariate_hypergeometric, improve docs
Diffstat (limited to 'doc/source/reference/random')
-rw-r--r--doc/source/reference/random/c-api.rst24
-rw-r--r--doc/source/reference/random/extending.rst2
2 files changed, 8 insertions, 18 deletions
diff --git a/doc/source/reference/random/c-api.rst b/doc/source/reference/random/c-api.rst
index 2a9de04dc..0d60f4d9e 100644
--- a/doc/source/reference/random/c-api.rst
+++ b/doc/source/reference/random/c-api.rst
@@ -3,25 +3,15 @@ Cython API for random
.. currentmodule:: numpy.random
-Typed versions of many of the `Generator` and `BitGenerator` methods can be
-accessed directly from Cython: the complete list is given below.
+Typed versions of many of the `Generator` and `BitGenerator` methods as well as
+the classes themselves can be accessed directly from Cython via
-The ``_bit_generator`` module is usable via::
+.. code-block:: cython
- cimport numpy.random._bit_generator
-
-It provides function pointers for quickly accessing the next bytes in the
-`BitGenerator` via a :c:type:`bitgen_t` struct.
-
-The ``_generator`` module is usable via::
-
- cimport numpy.random._generator
-
-It provides low-level functions for various distributions. All the functions
-require a ``bitgen_t`` BitGenerator structure.
+ cimport numpy.random
C API for random
----------------------
+----------------
Access to various distributions is available via Cython or C-wrapper libraries
like CFFI. All the functions accept a :c:type:`bitgen_t` as their first argument.
@@ -180,9 +170,9 @@ The functions are named with the following conventions:
.. c:function:: void random_multinomial(bitgen_t *bitgen_state, npy_int64 n, npy_int64 *mnix, double *pix, npy_intp d, binomial_t *binomial)
-.. c:function:: int random_mvhg_count(bitgen_t *bitgen_state, npy_int64 total, size_t num_colors, npy_int64 *colors, npy_int64 nsample, size_t num_variates, npy_int64 *variates)
+.. c:function:: int random_multivariate_hypergeometric_count(bitgen_t *bitgen_state, npy_int64 total, size_t num_colors, npy_int64 *colors, npy_int64 nsample, size_t num_variates, npy_int64 *variates)
-.. c:function:: void random_mvhg_marginals(bitgen_t *bitgen_state, npy_int64 total, size_t num_colors, npy_int64 *colors, npy_int64 nsample, size_t num_variates, npy_int64 *variates)
+.. c:function:: void random_multivariate_hypergeometric_marginals(bitgen_t *bitgen_state, npy_int64 total, size_t num_colors, npy_int64 *colors, npy_int64 nsample, size_t num_variates, npy_int64 *variates)
Generate a single integer
diff --git a/doc/source/reference/random/extending.rst b/doc/source/reference/random/extending.rst
index 12311379d..442102caa 100644
--- a/doc/source/reference/random/extending.rst
+++ b/doc/source/reference/random/extending.rst
@@ -49,7 +49,7 @@ RNG structure.
:start-after: example 2
These functions along with a minimal setup file are included in the
-`examples` folder, ``numpy.random.examples``.
+`examples` folder, ``numpy.random._examples``.
CFFI
====