diff options
author | mattip <matti.picus@gmail.com> | 2019-12-04 07:59:22 +0200 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-12-04 08:52:49 +0200 |
commit | 47fbdc1f8c9ed7ec79dfc7cdbb1affd453e84997 (patch) | |
tree | fabeb541d46622f1b593a128fb0b4a1afd4c3653 /numpy | |
parent | bd1adc3b6bb97e0fceada63617eb91fccc97f3ec (diff) | |
download | numpy-47fbdc1f8c9ed7ec79dfc7cdbb1affd453e84997.tar.gz |
API, DOC: change names to multivariate_hypergeometric, improve docs
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/include/numpy/random/distributions.h | 4 | ||||
-rw-r--r-- | numpy/random/_generator.pyx | 16 | ||||
-rw-r--r-- | numpy/random/src/distributions/random_mvhg_count.c | 4 | ||||
-rw-r--r-- | numpy/random/src/distributions/random_mvhg_marginals.c | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/numpy/core/include/numpy/random/distributions.h b/numpy/core/include/numpy/random/distributions.h index 0e69fc508..c474c4d14 100644 --- a/numpy/core/include/numpy/random/distributions.h +++ b/numpy/core/include/numpy/random/distributions.h @@ -169,14 +169,14 @@ DECLDIR void random_multinomial(bitgen_t *bitgen_state, RAND_INT_TYPE n, RAND_IN double *pix, npy_intp d, binomial_t *binomial); /* multivariate hypergeometric, "count" method */ -DECLDIR int random_mvhg_count(bitgen_t *bitgen_state, +DECLDIR int random_multivariate_hypergeometric_count(bitgen_t *bitgen_state, int64_t total, size_t num_colors, int64_t *colors, int64_t nsample, size_t num_variates, int64_t *variates); /* multivariate hypergeometric, "marginals" method */ -DECLDIR void random_mvhg_marginals(bitgen_t *bitgen_state, +DECLDIR void random_multivariate_hypergeometric_marginals(bitgen_t *bitgen_state, int64_t total, size_t num_colors, int64_t *colors, int64_t nsample, diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx index 74b379da8..d76cde44c 100644 --- a/numpy/random/_generator.pyx +++ b/numpy/random/_generator.pyx @@ -124,12 +124,12 @@ cdef extern from "numpy/random/distributions.h": void random_multinomial(bitgen_t *bitgen_state, int64_t n, int64_t *mnix, double *pix, np.npy_intp d, binomial_t *binomial) nogil - int random_mvhg_count(bitgen_t *bitgen_state, + int random_multivariate_hypergeometric_count(bitgen_t *bitgen_state, int64_t total, size_t num_colors, int64_t *colors, int64_t nsample, size_t num_variates, int64_t *variates) nogil - void random_mvhg_marginals(bitgen_t *bitgen_state, + void random_multivariate_hypergeometric_marginals(bitgen_t *bitgen_state, int64_t total, size_t num_colors, int64_t *colors, int64_t nsample, @@ -4010,18 +4010,18 @@ cdef class Generator: if method == 'count': with self.lock, nogil: - result = random_mvhg_count(&self._bitgen, total, - num_colors, colors_ptr, nsamp, - num_variates, variates_ptr) + result = random_multivariate_hypergeometric_count(&self._bitgen, + total, num_colors, colors_ptr, nsamp, + num_variates, variates_ptr) if result == -1: raise MemoryError("Insufficent memory for multivariate_" "hypergeometric with method='count' and " "sum(colors)=%d" % total) else: with self.lock, nogil: - random_mvhg_marginals(&self._bitgen, total, - num_colors, colors_ptr, nsamp, - num_variates, variates_ptr) + random_multivariate_hypergeometric_marginals(&self._bitgen, + total, num_colors, colors_ptr, nsamp, + num_variates, variates_ptr) return variates def dirichlet(self, object alpha, size=None): diff --git a/numpy/random/src/distributions/random_mvhg_count.c b/numpy/random/src/distributions/random_mvhg_count.c index 0c46ea417..7cbed1f9e 100644 --- a/numpy/random/src/distributions/random_mvhg_count.c +++ b/numpy/random/src/distributions/random_mvhg_count.c @@ -5,7 +5,7 @@ #include "numpy/random/distributions.h" /* - * random_mvhg_count + * random_multivariate_hypergeometric_count * * Draw variates from the multivariate hypergeometric distribution-- * the "count" algorithm. @@ -57,7 +57,7 @@ * * the product num_variates * num_colors does not overflow */ -int random_mvhg_count(bitgen_t *bitgen_state, +int random_multivariate_hypergeometric_count(bitgen_t *bitgen_state, int64_t total, size_t num_colors, int64_t *colors, int64_t nsample, diff --git a/numpy/random/src/distributions/random_mvhg_marginals.c b/numpy/random/src/distributions/random_mvhg_marginals.c index 7e4c24988..809d129de 100644 --- a/numpy/random/src/distributions/random_mvhg_marginals.c +++ b/numpy/random/src/distributions/random_mvhg_marginals.c @@ -8,7 +8,7 @@ /* - * random_mvhg_marginals + * random_multivariate_hypergeometric_marginals * * Draw samples from the multivariate hypergeometric distribution-- * the "marginals" algorithm. @@ -95,7 +95,7 @@ * * the product num_variates * num_colors does not overflow */ -void random_mvhg_marginals(bitgen_t *bitgen_state, +void random_multivariate_hypergeometric_marginals(bitgen_t *bitgen_state, int64_t total, size_t num_colors, int64_t *colors, int64_t nsample, |