ptc24: (Default)
posted by [personal profile] ptc24 at 12:57pm on 06/05/2010
it caches the second one and returns it from the next call

A while ago it had the problem that this caching didn't pay attention to re-seeding the RNG, and so you could do

>>> random.seed(10)
>>> random.gauss(0,1)
-0.95371700806333715
>>> random.seed(10)
>>> random.gauss(0,1)
-0.95371700806333715


and get a different answer the second time - an alternating pattern of two answers in fact. Evidently this has been fixed.

March

SunMonTueWedThuFriSat
            1
 
2
 
3
 
4
 
5
 
6 7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31