summaryrefslogtreecommitdiff
path: root/numpy/random/include
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: replace `NPY_INLINE` with `inline`Ralf Gommers2022-11-251-4/+4
| | | | Closes gh-22100
* MAIN: Minor include rationalization.Charles Harris2021-09-031-1/+1
| | | | | | | - Replace "Python.h" by <Python.h> - Replace "structmember.h" by <structmember.h> - Replace <npy_config> by "npy_config" - Define PY_SSIZE_T_CLEAN before all Python.h includes in .c files.
* PERF: Use exponentials in place of inversionKevin Sheppard2021-03-221-0/+1
| | | | Use exponentials rather than generating exponentials via inversion
* BUG: Use lop1p to improve numerical precisionKevin Sheppard2021-03-171-1/+1
| | | | | | | Use log1p(-x) instead of log(1 - x) Seperate legacy version from current closes #17020
* CLN: Move to legacy functionKevin Sheppard2021-02-261-0/+1
| | | | | | Avoid conditional compilation and move old version to legacy_vonmises Small clean up Additional comments
* API: restructure and document numpy.random C-API (#14604)Matti Picus2019-11-193-223/+1
| | | | | | | | | | | | | | | | * 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
* ENH: random: Add the multivariate hypergeometric distributionWarren Weckesser2019-10-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | The new method multivariate_hypergeometric(self, object colors, object nsample, size=None, method='marginals') of the class numpy.random.Generator implements the multivariate hypergeometric distribution; see https://en.wikipedia.org/wiki/Hypergeometric_distribution, specifically the section "Multivariate hypergeometric distribution". Two algorithms are implemented. The user selects which algorithm to use with the `method` parameter. The default, `method='marginals'`, is based on repeated calls of the univariate hypergeometric distribution function. The other algorithm, selected with `method='count'`, is a brute-force method that allocates an internal array of length ``sum(colors)``. It should only be used when that value is small, but it can be much faster than the "marginals" algorithm in that case. The C implementations of the two methods are in the files random_mvhg_count.c and random_mvhg_marginals.c in numpy/random/src/distributions.
* API: remove unused functions from distributions.hmattip2019-10-111-32/+17
|
* API: refactor function names in distribution.{h,c}, refactor float_fillmattip2019-10-111-25/+14
|
* API: rearrange the cython files in numpy.randommattip2019-10-114-0/+337