[SciPy-user] Mersenne Twister PRNG

Robert Kern rkern at ucsd.edu
Sat Sep 3 19:15:22 CDT 2005


skip at pobox.com wrote:
>     Robert> I've made a stab at replacing the RANLIB-based PRNG that we
>     Robert> currently use in scipy.stats with the superior-in-every-
>     Robert> conceivable-way Mersenne Twister.
> 
> Python has used the Mersenne Twister as the basis for its random number
> generator since at least 2.2.  Is there a reason to incorporate it
> separately?

Yes! We need to get lots of random numbers stuffed into arrays on the C
level. AFAICT, _random doesn't expose a C API.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter



More information about the SciPy-user mailing list