seeds in gaussian random number generator
Marc Christiansen
tolot at utolot.toppoint.de
Fri Sep 15 04:46:15 EDT 2000
Frédéric van der <fplancke at my-deja.com> wrote:
> The seed function is not in module random (too bad) but in
With Python 1.5.2 it is.
(0;0)10.SRam:> python
Python 1.5.2 (#5, Feb 14 2000, 21:08:19) [SAS/C 6.x] on amiga
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import random
>>> print random.seed.__doc__
Seed the default generator from any hashable value.
None or no argument returns (0, 0, 0) to seed from current time.
>>>
I think the doc string is faulty and the second line should read s.th.
like
None or no argument seeds from current time.
but that doesn't change the function ;-)
> 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.)
see above
Ciao
Marc
--
Save the rainforest: Go to http://rainforest.care2.com/welcome?w=190056410
PGP-Key fingerprint EE 2E C1 06 D1 28 89 D2 F9 CE 35 7B F8 F4 42 52
Marc Christiansen 24109 Kiel
More information about the Python-list
mailing list