[SciPy-User] numpy.random generator specifications
W.T. Bridgman
cygnusx1 at mac.com
Sat Jan 22 13:53:23 EST 2011
> On Sat, Jan 22, 2011 at 11:16, W.T. Bridgman <cygnusx1 at mac.com> wrote:
>> When I use numpy.random, in numpy v 1.5.1, what type of random number
>> generator am I using? ?There seems to be mixed claims online as to
>> the
>> actual generator.
>
> The underlying uniform PRNG is the Mersenne Twister, specifically
> MT19937.
>
> http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.mtrand.RandomState.html#numpy.random.mtrand.RandomState
This is great. My searches for 'random generator' and similar on
scipy returns loads of hits and there wasn't enough in the summary to
clearly identify what I was seeking.
>
> I'd be interested to know who is claiming otherwise.
Most of the sources seemed rather old versions of numpy/numarray/NumPy
and uncertain, found by google searches for "numpy random generator"
and similar terms.
>
>> Also, what is the period of the generator?
>
> 2**19937 - 1
>
> http://en.wikipedia.org/wiki/Mersenne_twister
>
Thanks. I suspected this was the answer from my previous searches but
wasn't sure where I could get it verified.
Tom
--
W.T. Bridgman, Ph.D.
Physics & Astronomy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110122/511efb19/attachment.html>
More information about the SciPy-User
mailing list