summaryrefslogtreecommitdiff
path: root/numpy/random
Commit message (Collapse)AuthorAgeFilesLines
...
* DOC: Minor edits to docstrings to improve consistency in the moduleGeorge Castillo2015-03-281-106/+128
| | | | | Fixed a number of references that were malformatted and broken links. Module still needs work, particularly in standardizing return values.
* DOC: Incremental improvement in random module docstringsGeorge Castillo2015-03-281-123/+146
| | | | | | Fixed some broken links, references, and missing values. Also reverted some earlier edits to return value descriptions to make them less confusing.
* DOC: Covariance matrix should be symmetricBlake Griffith2015-03-261-1/+1
|
* BUG: Fix potential overflows in rk_hypergeometric_hrua()Anton Ovchinnikov2015-03-032-2/+13
|
* DOC: correct erroneous description of Rayleigh distributionEric Firing2015-01-301-4/+4
|
* DOC: fix a few bugs in the random.pareto docstring. Closes gh-4181.Ralf Gommers2015-01-171-15/+15
| | | | [ci skip]
* DOC: style fixes for random.multivariate_normal docstring.Martin Thoma2015-01-071-8/+12
|
* Merge pull request #5390 from sturlamolden/mtrand-bugfix-threadsafeJulian Taylor2014-12-231-16/+22
|\ | | | | | | BUG: Make RandomState.seed, RandomState.randint and RandomState.shuffle threadsafe
| * BUG: make seed, randint and shuffle threadsafeSturla Molden2014-12-231-16/+22
| |
* | Merge pull request #5388 from sturlamolden/mtrand-bugfix-threadsafeJulian Taylor2014-12-231-7/+11
|\ \ | |/ | | | | BUG: Make RandomState.set_state and RandomState.get_state threadsafe
| * BUG: make set_state and get_state threadsafeSturla Molden2014-12-231-7/+11
| |
* | DOC : do not abuse enumeration for return typesThomas A Caswell2014-12-121-5/+5
| | | | | | | | | | change '{ndarray, float}' -> 'ndarray or float' as {} are for when the value is an enumeration
* | Update docstring for multivariate_normal().chebee7i2014-11-101-4/+6
| | | | | | | | | | | | The change is to make a stronger statement that the covariance matrix must be positive-semidefinite and that if it is not, then the results are not guaranteed across NumPy versions.
* | Merge pull request #5140 from pyhits/5136Julian Taylor2014-09-301-1/+4
|\ \ | | | | | | | | | BUG: ImportError: No module named thread
| * | BUG: ImportError: No module named threadUlrich Seidl2014-09-301-1/+4
| |/ | | | | | | Fixes #5136. Import dummy_threading if importing threading fails.
* | Throws if range is too large for 'random.uniform'Masud Rahman2014-09-282-2/+22
| | | | | | | | | | | | | | | | This fixes issue #2138 by checking that the range (i.e. high - low) is finite before invoking `rk_uniform`. A test case was added to ensure valid ranges do not throw, but invalid ranges do.
* | TST: gnufreebsd has fixed the thread control word lossJulian Taylor2014-09-141-3/+1
| | | | | | | | http://lists.alioth.debian.org/pipermail/glibc-bsd-commits/2014-September/004163.html
* | Merge pull request #5051 from juliantaylor/thread-test-fixCharles Harris2014-09-061-1/+8
|\ \ | | | | | | TST: accept small error in threaded random test
| * | TST: accept small error in threaded random testJulian Taylor2014-09-061-1/+8
| |/ | | | | | | | | | | | | freebsd and windows change x87 precision mode (fctrl bit 8 and 9) from extended to double in child threads so the random numbers cannot be exactly the same from master and child threads. see gh-4909
* | Merge pull request #4937 from charris/pep8-numpy-randomJulian Taylor2014-08-234-175/+171
|\ \ | | | | | | Pep8 numpy random
| * | BUG: Fix None comparison giving FutureWarning in choice function.Charles Harris2014-07-311-3/+3
| | | | | | | | | | | | | | | This is in numpy/random/mtrand/mtrand.pyx where the choice function was using comparisons of the form `None != p`.
| * | STY: PEP8 fixups for numpy/random.Charles Harris2014-07-313-172/+168
| |/
* | DOC: document broadcastable lam parameter of poissonJulian Taylor2014-06-111-2/+7
|/ | | | closes gh-4526
* Optimization for pickling random statesmarkdepristo2014-06-021-1/+9
| | | | -- Addresses https://github.com/numpy/numpy/issues/4763
* BUG: avoid infinite loop for small kappa in vonmisesJulian Taylor2014-05-282-4/+20
| | | | | | | rho results in 0. for kappa < 1.4e-8 whch leads to nans appearing and an infinite loop. the second order taylor expansion is more precise up to at least 1e-5. Closes gh-4720
* BUG: reject too large seeds to RandomStateJulian Taylor2014-05-153-2/+40
| | | | | | mtrand accepts seeds larger than 32 bit but silently truncates them back to 32 bit. This can lead to accidentally getting the same random stream for two different seeds, e.g. 1 and 1 + 2**40.
* BUG: mtrand binomial algorithm is different from original paper algorithmJosh Lawrence2014-05-081-7/+4
|
* ENH: replace GIL of random module with a per state lockJulian Taylor2014-05-023-257/+383
| | | | | | | | | | | | | | | The random module currently relies on the GIL for the state synchronization which hampers threading performance. Instead add a lock to the RandomState object and take it for all operations calling into randomkit while releasing the GIL. This allows parallizing random number generation using multiple states or asynchronous generation in a worker thread. Note that with a large number of threads the standard mersenne twister used may exhibit overlap if the number of parallel streams is large compared to the size of the state space, though due to the limited scalability of Python in regards to threads this is likely not a big issue.
* Merge pull request #4641 from gdementen/random_docstring_fixesCharles Harris2014-05-011-87/+123
|\ | | | | DOC: standardize "size" arg description in random module docstrings
| * DOC: standardize "size" argument description in docstrings for functions of ↵Gaëtan de Menten2014-04-251-87/+123
| | | | | | | | | | | | random module there were many different versions for no good reason
* | DOC: fixed typoGaëtan de Menten2014-04-251-1/+1
|/
* fixed bad signature in docstring for uniform()Gaëtan de Menten2014-04-111-1/+1
|
* BLD: remove cython c source from gitJulian Taylor2014-04-051-26575/+0
| | | | | | | Instead generate at build time. The generated sources are still part of the sdist. tools/cythonize.py is copied from SciPy with small changes to the configuration.
* BUG: Explicitly reject nan values for p in binomial(n, p). Fixes #4571.Daniel da Silva2014-04-043-1259/+1339
| | | | Adds check with np.isnan(p) and raises ValueError if check is positive.
* TST: Add some tests for random.multivariate_normal.Charles Harris2014-03-221-10/+23
| | | | | | | | Explicitly Test that the default shape does not raise a DeprecationWarning. Check that a covariance matrix that is not positive-semidefinite raises a RuntimeWarning.
* ENH, MAINT: Check that covariance is positive-semidefinite.Charles Harris2014-03-222-7241/+7140
| | | | | | | | | | | | | | | | numpy.random.multivariate_normal uses SVD to obtain the covariance square root, but the result will be incorrect if the covariance is not positive-semidefinite and no warning will be given. However, a check can be made even while using the SVD by checking if the rows of u.T and v have the same sign, where u and v are given by u, d, v = svd(a). A deprecation warning is also fixed. When the default size was used an empty list was passed to multiply.reduce, which resulted in a default float 1. for a shape index. That is no longer legal. The problem is fixed by using an array reshape, which also avoids potential overflow in the original computation. Closes #4489.
* DOC: Fix typo in np.random.choice documentationAllen Riddell2014-02-271-1/+1
| | | np.random.permutation returns an array, which can be sliced.
* BUG: handle non integer types for multinomial/dirichlet sizeJulian Taylor2014-02-223-3048/+3296
| | | | Closes gh-3173
* BUG: fix shuffling of flexible dtypes and masked arraysJulian Taylor2014-02-133-589/+653
| | | | | closes gh-4270 and gh-3263 also regenerate with cython 0.20.1
* Merge pull request #4213 from juliantaylor/choice-improvseberg2014-01-222-8070/+8087
|\ | | | | improve random.choice performance and regen with cython 0.20
| * MAINT: regenerate with cython 0.20 and fix a warning it emitsJulian Taylor2014-01-192-8066/+8080
| | | | | | | | Fixed warning is "Non-trivial type declarators in shared declaration".
| * ENH: reduce overhead of probs check of choiceJulian Taylor2014-01-191-4/+7
| | | | | | | | | | Use kahan_sum as multinomial does. Closes gh-4188
* | MAINT: silence some build warnings due to missing NO_IMPORT_ARRAYRalf Gommers2014-01-191-0/+1
|/
* BUG: compile random in lfs modeJulian Taylor2014-01-032-1/+10
| | | | | randomkit.c uses fopen which requires LFS mode to support larger than 64 bit files on 32 bit systems.
* BUG: fix incorrect type in binomial ditsributions.cSebastian Berg2013-12-041-1/+1
| | | | | | | This caused slowness and wrong/potentially wrong results when the binomial result is larger then a native C int. Closes gh-3352
* DOC: Fix misleading description of random_sample in numpy.random docstring.Mark Dickinson2013-10-151-2/+2
|
* Fix example plot of Laplace distributionNiklas Koep2013-10-151-2/+2
| | | In the PDF used for the example plot of the Laplace distribution only the location parameter loc instead of the absolute difference between random variable and loc was divided by the scale parameter. For the example at hand this makes no difference as loc is 0 and lambda is 1. For different values, however, the plot makes no sense.
* MAINT: make loggam static in random kitLars Buitinck2013-09-081-3/+4
|
* STY: Giant comma spacing fixup.Charles Harris2013-08-183-36/+36
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* STY: Giant whitespace cleanup.Charles Harris2013-08-183-729/+729
| | | | Now is as good a time as any with open PR's at a low.