Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | SF patch 658251: Install a C implementation of the Mersenne Twister as the | Raymond Hettinger | 2002-12-29 | 1 | -225/+178 |
| | | | | core generator for random.py. | ||||
* | Clarify and speedup test. | Raymond Hettinger | 2002-12-07 | 1 | -2/+3 |
| | |||||
* | Improve comments. Clarify docs. | Raymond Hettinger | 2002-11-18 | 1 | -15/+14 |
| | | | | | Replace "type(0)" with "int". Replace "while 1" with "while True" | ||||
* | Improved clarity and thoroughness of docstring. | Raymond Hettinger | 2002-11-13 | 1 | -20/+41 |
| | | | | | | | | Added design notes in comments. Used better variable names. Eliminated the unsavory "pool[-k:]" which was an aspiring bug (for k==0). Used if/else to show the two algorithms in parallel style. Added one more test assertion. | ||||
* | Docstring typo fix | Andrew M. Kuchling | 2002-11-13 | 1 | -1/+1 |
| | |||||
* | SF patch 629637: Add sample(population, k) method to the random module. | Raymond Hettinger | 2002-11-12 | 1 | -2/+56 |
| | | | | Used for random sampling without replacement. | ||||
* | SF bug 594996: OverflowError in random.randrange | Tim Peters | 2002-08-16 | 1 | -4/+17 |
| | | | | | | Loosened the acceptable 'start' and 'stop' arguments so that any Python (bounded) ints can be used. So, e.g., randrange(-sys.maxint-1, sys.maxint) no longer blows up. | ||||
* | Whitespace normalized. | Raymond Hettinger | 2002-05-23 | 1 | -11/+11 |
| | |||||
* | Deprecated Random.cunifvariate clearing bug 506647. Also, added docstrings. | Raymond Hettinger | 2002-05-23 | 1 | -0/+81 |
| | |||||
* | Whitespace normalization. | Tim Peters | 2002-05-23 | 1 | -5/+5 |
| | |||||
* | Use spaces, not tabs for indents. | Guido van Rossum | 2002-05-14 | 1 | -4/+4 |
| | | | | Raymond Hettinger, beware! This caused the Unix install to fail! | ||||
* | Closes patch 529408 deprecating random.stdgamma(). | Raymond Hettinger | 2002-05-14 | 1 | -11/+35 |
| | |||||
* | Closes SF bug 527139. Moved temp variables inside guard. | Raymond Hettinger | 2002-05-13 | 1 | -7/+6 |
| | |||||
* | random.gauss() uses a piece of hidden state used by nothing else, | Tim Peters | 2002-05-05 | 1 | -1/+4 |
| | | | | | | | | | | | and the .seed() and .whseed() methods failed to reset it. In other words, setting the seed didn't completely determine the sequence of results produced by random.gauss(). It does now. Programs repeatedly mixing calls to a seed method with calls to gauss() may see different results now. Bugfix candidate (random.gauss() has always been broken in this way), despite that it may change results. | ||||
* | BDFL agreed with Tim: rehabilitate randint(). | Neal Norwitz | 2002-04-13 | 1 | -2/+0 |
| | |||||
* | SF patch 483059: Avoid use of eval() in random.py, from Finn Bock. | Tim Peters | 2001-11-25 | 1 | -6/+5 |
| | | | | | | _verify(): Pass in the values of globals insted of eval()ing their names. The use of eval() was obscure and unnecessary, and the patch claimed random.py couldn't be used in Jython applets because of it. | ||||
* | Whitespace normalization. | Tim Peters | 2001-02-15 | 1 | -1/+1 |
| | |||||
* | bunch more __all__ lists | Skip Montanaro | 2001-02-15 | 1 | -0/+6 |
| | | | | | | also modified check_all function to suppress all warnings since they aren't relevant to what this test is doing (allows quiet checking of regsub, for instance) | ||||
* | Repaired a docstring. | Tim Peters | 2001-02-01 | 1 | -1/+1 |
| | |||||
* | Change random.seed() so that it can get at the full range of possible | Tim Peters | 2001-02-01 | 1 | -37/+67 |
| | | | | | | | | internal states. Put the old .seed() (which could only get at about the square root of the # of possibilities) under the new name .whseed(), for bit-level compatibility with older versions. This occurred to me while reviewing effbot's book (he found himself stumbling over .seed() more than once there ...). | ||||
* | New comment block to Clarify a subtlety. | Tim Peters | 2001-01-26 | 1 | -1/+5 |
| | |||||
* | The combo of getstate/setstate/jumpahead is very powerful, but needs | Tim Peters | 2001-01-26 | 1 | -6/+45 |
| | | | | examples to flesh it out for the uninitiated. Here they are. | ||||
* | SF bug 130030: Claim of bad betavariate algorithm. | Tim Peters | 2001-01-26 | 1 | -6/+19 |
| | |||||
* | Cosmetic changes after some sleep; no change in semantics. | Tim Peters | 2001-01-25 | 1 | -64/+82 |
| | |||||
* | Fix bugs introduced by rewrite (in particular, time-based initialization | Tim Peters | 2001-01-25 | 1 | -4/+38 |
| | | | | | | | got broken). Also added new method .jumpahead(N). This finally gives us a semi-decent answer to how Python's RNGs can be used safely and efficiently in multithreaded programs (although it requires the user to use the new machinery!). | ||||
* | Reworked random.py so that it no longer depends on, and offers all the | Tim Peters | 2001-01-25 | 1 | -257/+413 |
| | | | | | | | | | | | functionality of, whrandom.py. Also closes all the "XXX" todos in random.py. New frequently-requested functions/methods getstate() and setstate(). All exported functions are now bound methods of a hidden instance. Killed all unintended exports. Updated the docs. FRED: The more I fiddle the docs, the less I understand the exact intended use of the \var, \code, \method tags. Please review critically. GUIDO: See email. I updated NEWS as if whrandom were deprecated; I think it should be. | ||||
* | Whitespace normalization. | Tim Peters | 2001-01-15 | 1 | -219/+219 |
| | |||||
* | Repair senseless random.seed docstring (reported on c.l.py). | Tim Peters | 2000-09-16 | 1 | -1/+1 |
| | |||||
* | The third and final doc-string sweep by Ka-Ping Yee. | Guido van Rossum | 2000-02-04 | 1 | -20/+21 |
| | | | | | | | | The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac. | ||||
* | Add Tim Peters' shuffle() algorithm. | Guido van Rossum | 1999-08-18 | 1 | -0/+21 |
| | |||||
* | Added randrange to list of exported functions. | Guido van Rossum | 1998-07-31 | 1 | -1/+1 |
| | |||||
* | Make gauss() semi-thread-safe. It can still give duplicate results, | Guido van Rossum | 1998-05-29 | 1 | -4/+14 |
| | | | | | but it can no longer raise an exception when called by several threads simultaneously. | ||||
* | Add Interfaces to replace remaining needs for importing whrandom. | Guido van Rossum | 1998-05-20 | 1 | -0/+46 |
| | | | | # XXX TO DO: make the distribution functions below into methods. | ||||
* | Correction to vonmisesvariate() by Magnus Kessler: it should take and | Guido van Rossum | 1998-04-06 | 1 | -5/+12 |
| | | | | | return something between 0 and 2*pi. Also added a reference to the literature. | ||||
* | Fixed a bug in the gauss() function. The bug was reported by Mike | Guido van Rossum | 1998-02-19 | 1 | -5/+6 |
| | | | | | | | | Miller, who complained that its kurtosis was bad, and then fixed by Lambert Meertens (author of the original algorithm) who discovered that the mathematical analysis leading to his solution was wrong, and provided a corrected version. Mike then tested the fix and reported that the kurtosis was now good. | ||||
* | # Typos in the comments giving the names of two recently added distributions. | Guido van Rossum | 1997-12-09 | 1 | -2/+2 |
| | |||||
* | Added Pareto and Weibull distributions, courtesy Jeremy Hylton. | Guido van Rossum | 1997-12-02 | 1 | -0/+18 |
| | |||||
* | Changes to use default argument values where possible | Guido van Rossum | 1994-05-06 | 1 | -5/+1 |
| | |||||
* | Use float constants directly; cosmetic changes; initialize largest | Guido van Rossum | 1994-03-15 | 1 | -22/+33 |
| | | | | correctly; allow test(N) to set number of calls in the tests. | ||||
* | Added gauss() (same as normal but twice as fast) and betavariate(); | Guido van Rossum | 1994-03-09 | 1 | -6/+47 |
| | | | | print more statistics in test_generator() | ||||
* | Random variable generators | Guido van Rossum | 1994-03-09 | 1 | -0/+212 |