summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization.Tim Peters2001-02-151-1/+1
|
* bunch more __all__ listsSkip Montanaro2001-02-151-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 Peters2001-02-011-1/+1
|
* Change random.seed() so that it can get at the full range of possibleTim Peters2001-02-011-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 Peters2001-01-261-1/+5
|
* The combo of getstate/setstate/jumpahead is very powerful, but needsTim Peters2001-01-261-6/+45
| | | | examples to flesh it out for the uninitiated. Here they are.
* SF bug 130030: Claim of bad betavariate algorithm.Tim Peters2001-01-261-6/+19
|
* Cosmetic changes after some sleep; no change in semantics.Tim Peters2001-01-251-64/+82
|
* Fix bugs introduced by rewrite (in particular, time-based initializationTim Peters2001-01-251-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 theTim Peters2001-01-251-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 Peters2001-01-151-219/+219
|
* Repair senseless random.seed docstring (reported on c.l.py).Tim Peters2000-09-161-1/+1
|
* The third and final doc-string sweep by Ka-Ping Yee.Guido van Rossum2000-02-041-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 Rossum1999-08-181-0/+21
|
* Added randrange to list of exported functions.Guido van Rossum1998-07-311-1/+1
|
* Make gauss() semi-thread-safe. It can still give duplicate results,Guido van Rossum1998-05-291-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 Rossum1998-05-201-0/+46
| | | | # XXX TO DO: make the distribution functions below into methods.
* Correction to vonmisesvariate() by Magnus Kessler: it should take andGuido van Rossum1998-04-061-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 MikeGuido van Rossum1998-02-191-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 Rossum1997-12-091-2/+2
|
* Added Pareto and Weibull distributions, courtesy Jeremy Hylton.Guido van Rossum1997-12-021-0/+18
|
* Changes to use default argument values where possibleGuido van Rossum1994-05-061-5/+1
|
* Use float constants directly; cosmetic changes; initialize largestGuido van Rossum1994-03-151-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 Rossum1994-03-091-6/+47
| | | | print more statistics in test_generator()
* Random variable generatorsGuido van Rossum1994-03-091-0/+212