[SciPy-dev] Re: [Numpy-discussion] Release of scipy core betawillhappen next week.

Fernando Perez Fernando.Perez at colorado.edu
Wed Sep 28 04:19:39 CDT 2005


Robert Kern wrote:

> Actually, it's the *solution* to that problem. Unlike the older
> RANLIB-based modules, random.py and mtrand define generator objects that
> keep their state tied to the object. You can instantiate them as many
> times as you like with different states (another benefit of the
> /dev/urandom seeding over seeding with the time; there's no real chance
> that you'll seed two generators with the same state no matter how close
> in time you instantiate them). There are no globals. Give me a little
> bit of time to check it in and you can see for yourself.

Very nice.  You may recall that  at scipy'05, for the parallel demo I had to 
use a stupid serialized hack for seeding the RNGs in a cluster from the 
ipython control console, with a time.sleep(1.5) in between calls.  This hack 
was _precisely_ to work around the problem you point to, and I'll be very 
happy not to have to use it in the future.

Cheers,

f




More information about the Scipy-dev mailing list