[Numpy-discussion] About Random Number Generation

Robert Kern robert.kern@gmail....
Fri Oct 31 12:49:29 CDT 2008


On Fri, Oct 31, 2008 at 12:20, Wu, Kejia <w.kejia@gmail.com> wrote:
> Hi all,
>
> I tried the example code here:
> http://numpy.scipy.org/numpydoc/numpy-20.html#71863
> But failed:
> --------------------------------------
> rng.py, line 5, in <module>
>    import RNG
> ImportError: No module named RNG
> --------------------------------------
>
> Any suggestion? Thanks at first.

Despite the confusing URL, that is actually documentation for Numeric,
numpy's predecessor. You can see documentation for the current version
of numpy here:

  http://docs.scipy.org/doc/

> Also, can any body tell me whether the random number algorithm in RNG
> package is a pseudorandom one or a real-random one?

Pseudorandom. The Mersenne Twister, to be precise.

> And is there an
> available implementation for Monte Carlo method in NumPy?

"Monte Carlo" is more a general description than a specification of a
particular algorithm. There are many such methods. Which one are you
thinking of?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the Numpy-discussion mailing list