summaryrefslogtreecommitdiff
path: root/numpy/random/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * BUG: fix PCG64 ng->inc.high initializationmattip2019-06-261-1/+1
| |
* | ENH: Add SFC64 BitGenerator.Robert Kern2019-06-253-0/+126
|/
* ENH: use SeedSequence to generate entropy for seedingmattip2019-06-263-12/+19
|
* MAINT: remove xoshiro* BitGeneratorsmattip2019-06-2612-570/+0
|
* MAINT: remove ThreeFry BitGeneratormattip2019-06-257-596/+1
|
* MAINT: remove pcg32 BitGeneratormattip2019-06-256-2469/+0
|
* MAINT: Correct intrinsic use on WindowsKevin Sheppard2019-06-211-0/+4
| | | | Add pragme and include for Windows PCG64
* Merge pull request #13791 from mattip/remove-dSFMTCharles Harris2019-06-2015-2157/+0
|\ | | | | MAINT: remove dSFMT
| * MAINT: remove dSFMTmattip2019-06-1615-2157/+0
| |
* | Merge pull request #13786 from WarrenWeckesser/random-warningsMatti Picus2019-06-183-6/+8
|\ \ | |/ |/| MAINT: random: Fix a few compiler warnings.
| * MAINT: random: Fix a few compiler warnings.Warren Weckesser2019-06-143-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: gcc: numpy/random/src/xoshiro256/xoshiro256.c numpy/random/src/xoshiro256/xoshiro256.c:39:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (i = 0; i < sizeof JUMP / sizeof *JUMP; i++) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc: numpy/random/src/xoshiro512/xoshiro512.c numpy/random/src/xoshiro512/xoshiro512.c:43:17: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (i = 0; i < sizeof JUMP / sizeof *JUMP; i++) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ numpy/random/src/xoshiro512/xoshiro512.c:46:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (w = 0; w < sizeof s_placeholder / sizeof *s_placeholder; w++) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc: numpy/random/src/distributions/distributions.c numpy/random/src/distributions/distributions.c:185:14: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'const uint64_t' (aka 'const unsigned long long') [-Wsign-compare] if (rabs < ki_double[idx]) ~~~~ ^ ~~~~~~~~~~~~~~ numpy/random/src/distributions/distributions.c:230:14: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare] if (rabs < ki_float[idx]) ~~~~ ^ ~~~~~~~~~~~~~
* | MAINT: random: Rewrite the hypergeometric distribution.Warren Weckesser2019-06-146-106/+550
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of the changes: * Move the functions random_hypergeometric_hyp, random_hypergeometric_hrua and random_hypergeometric from distributions.c to legacy-distributions.c. These are now the legacy implementation of hypergeometric. * Add the files logfactorial.c and logfactorial.h, containing the function logfactorial(int64_t k). * Add the files random_hypergeometric.c and random_hypergeometric.h, containing the function random_hypergeometric (the new implementation of the hypergeometric distribution). See more details below. * Fix two tests in numpy/random/tests/test_generator_mt19937.py that used values returned by the hypergeometric distribution. The new implementation changes the stream, so those tests needed to be updated. * Remove another test obviated by an added constraint on the arguments of hypergeometric. Details of the rewrite: If you carefully step through the old function rk_hypergeometric_hyp(), you'll see that the end result is basically the same as the new function hypergeometric_sample(), but the new function accomplishes the result with just integers. The floating point calculations in the old code caused problems when the arguments were extremely large (explained in more detail in the unmerged pull request https://github.com/numpy/numpy/pull/9834). The new version of hypergeometric_hrua() is a new translation of Stadlober's ratio-of-uniforms algorithm for the hypergeometric distribution. It fixes a mistake in the old implementation that made the method less efficient than it could be (see the details in the unmerged pull request https://github.com/numpy/numpy/pull/11138), and uses a faster function for computing log(k!). The HRUA algorithm suffers from loss of floating point precision when the arguments are *extremely* large (see the comments in github issue 11443). To avoid these problems, the arguments `ngood` and `nbad` of hypergeometric must be less than 10**9. This constraint obviates an existing regression test that was run on systems with 64 bit long integers, so that test was removed.
* MAINT: random: Combine ziggurat.h and ziggurat_constants.hWarren Weckesser2019-06-123-277/+10
| | | | ... and remove the unused arrays that were in ziggurat.h.
* MAINT: random: Rename legacy distributions file.Warren Weckesser2019-06-092-1/+1
| | | | | | In numpy/random/src/legacy/, rename distributions-boxmuller.c to legacy-distributions.c. This file holds all the legacy distributions, so the new name is more accurate.
* MAINT: random: Remove unused empty file binomial.h.Warren Weckesser2019-06-081-0/+0
| | | | The file numpy/random/src/distributions/binomial.h was empty and unused.
* Merge pull request #13665 from bashtage/rkern-pcg-patchMatti Picus2019-05-311-7/+25
|\ | | | | MAINT: Use intrinsics in Win64-PCG64
| * PERF: Use intrinsics in Win64-PCG64Kevin Sheppard2019-05-311-7/+25
| | | | | | | | Use intrinsics to speed up PCG64 on Windows 64
* | MAINT: Misc. typo fixes (#13664)luzpaz2019-05-316-6/+6
|/ | | | | | * DOC, MAINT: Misc. typo fixes Found via `codespell`
* Merge pull request #13657 from rkern/fix/c-underscoresSebastian Berg2019-05-282-9/+9
|\ | | | | BUG: Avoid leading underscores in C function names.
| * BUG: Avoid leading underscores in C function names.Robert Kern2019-05-282-9/+9
| | | | | | | | They are reserved in the C and POSIX standards.
* | PERF: Use intrinsic rotr on WindowsKevin Sheppard2019-05-281-0/+5
|/ | | | Use _rotr64 on Windows to avoid compiler generated rotr instructions
* PERF: Reorder header for philox (#34)Kevin Sheppard2019-05-272-10/+10
| | | | | | * PERF: Reorder header for philox Reorder header so that support uint128 is always used if avilable, irrespective of platform
* Revert "MAINT: Implement API changes for randomgen-derived code"Kevin Sheppard2019-05-2713-0/+5089
| | | | This reverts commit 17e0070df93f4262908f884dca4b08cb7d0bba7f.
* MAINT: Remove remnants of bit generatorsKevin Sheppard2019-05-2714-612/+0
| | | | | Remove traces of the three removed bit generators Add lock to Cython examples
* ENH: Split poisson_lam_maxKevin Sheppard2019-05-231-2/+2
| | | | | | Use type-dependent poisson lam max Make private Fix backward compat issue in loggam
* MAINT: remove threefry32, xoroshiro128, xorshift1024 BitGeneratorsmattip2019-05-204-980/+0
|
* BLD: Use numpy detection of SSEKevin Sheppard2019-05-201-0/+6
| | | | Let numpy detect SSE2
* BUG: Ensure integer-type stream on 32bitKevin Sheppard2019-05-204-76/+134
| | | | | | Ensure integer type is stream compatible on 32 bit Fix incorrect clause end Add integer-generator tests that check long streams
* MAINT: Implement API changes for randomgen-derived codemattip2019-05-2049-6509/+650
| | | | | | | | | | | | | | | | | | | | | remove numpy.random.gen, BRNG.generator, pcg*, rand, randn remove use_mask and Lemire's method, fix benchmarks for PCG removal convert brng to bitgen (in C) and bit_generator (in python) convert base R{NG,andom.*} to BitGenerator, fix last commit randint -> integers, remove rand, randn, random_integers RandomGenerator -> Generator, more "basic RNG" -> BitGenerator random_sample -> random, jump -> jumped, resync with randomgen Remove derived code from entropy Port over changes accepted in upstream to protect log(0.0) where relevant fix doctests for jumped, better document choice Remove Python 2.7 shims Use NPY_INLINE to simplify Fix performance.py to work Renam directory brng to bit_generators Fix examples wiht new directory structure Clarify relationship to historical RandomState Remove references to .generator Rename xoshiro256/512starstar
* MAINT: Remove Cython conditionalsKevin Sheppard2019-05-202-2/+51
| | | | Remove Cython conditional compilation and use preprocessor only
* BUG: Fix type in zipfKevin Sheppard2019-05-201-1/+1
| | | | Correct type form long to int64
* ENH: Extend multinomial and fix zipfKevin Sheppard2019-05-202-13/+42
| | | | | | Extend multinomial to allow broadcasting Fix zipf changes missed in NumPy Enable 0 as valid input for hypergeometric
* BENCH: convert bencmarks to asv formatmattip2019-05-20100-0/+16834
remove files that were part of the origal repo rework randomgen docs to integrate with numpy and fix some links remove convenience functions, require explicit call to gen.brng move code out of numpy.random.randomgen into numpy.random