Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-06 Thread Giovanni Samaey
Dear Robert, indeed, this is the difference ! Thanks ! Seeding numpy with 4357 gives identical sequences... Giovanni On 05 Nov 2008, at 19:01, Robert Kern wrote: > On Wed, Nov 5, 2008 at 08:05, Giovanni Samaey > <[EMAIL PROTECTED]> wrote: >>> >>> Hi, >>> how about other seed values ? I th

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Robert Kern
On Wed, Nov 5, 2008 at 08:05, Giovanni Samaey <[EMAIL PROTECTED]> wrote: >> >> Hi, >> how about other seed values ? I thought seed=0, is (often) used to >> mean a "random", i.e. current time or alike, seed value ... !? > > Not in this case: I always get the same sequence with seed=0 > (different f

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Gabriel Gellner
On Wed, Nov 05, 2008 at 03:19:09PM +0100, Matthieu Brucher wrote: > > Not in this case: I always get the same sequence with seed=0 > > (different for both implementation, but the same each time I run it.) > > I got around it by installing pygsl and taking random numbers from > > there instead of fr

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Matthieu Brucher
> Not in this case: I always get the same sequence with seed=0 > (different for both implementation, but the same each time I run it.) > I got around it by installing pygsl and taking random numbers from > there instead of from numpy. > > But I still find it strange to get two different sequences f

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Giovanni Samaey
> > Hi, > how about other seed values ? I thought seed=0, is (often) used to > mean a "random", i.e. current time or alike, seed value ... !? Not in this case: I always get the same sequence with seed=0 (different for both implementation, but the same each time I run it.) I got around it by ins

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread David Cournapeau
Sebastian Haase wrote: > > Hi, > how about other seed values ? I thought seed=0, is (often) used to > mean a "random", i.e. current time or alike, seed value ... !? > Not really. A fixed seed means you will always get the exact same serie of numbers. The seed is the initial condition of your r

Re: [Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Sebastian Haase
On Wed, Nov 5, 2008 at 11:30 AM, Giovanni Samaey <[EMAIL PROTECTED]> wrote: > Hi all, > I have a question concerning the Mersenne Twister random number generation > in numpy: when I seed it with 0, I get a different sequence of numbers in > numpy, compared to GSL. > In numpy: > r = numpy.Random.Ra

[Numpy-discussion] random number generation in python compared to gsl

2008-11-05 Thread Giovanni Samaey
Hi all, I have a question concerning the Mersenne Twister random number generation in numpy: when I seed it with 0, I get a different sequence of numbers in numpy, compared to GSL. In numpy: r = numpy.Random.RandomState(seed=0) r.uniform(size=5) > array([ 0.5488135 , 0.71518937,