faqts : Computers : Programming : Languages : Python : Common Problems : Maths : Random Numbers

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 8 people (75%) answered Yes
Recently 2 of 3 people (67%) answered Yes

Entry

Is there any way to set the initial seed for the Gaussian random number generator function "gauss"?

Sep 18th, 2000 22:30
unknown unknown, Frédéric van der Plancke


The seed function is not in module random (too bad) but in
module whrandom:
So you can do:
    import whrandom
    whrandom.seed()
    #or, with up to three integer arguments:
    whrandom.seed(1,2,3)
(whrandom is actually meant to be "hidden implementation
details", but we obviously still need it explicitly.)