[Numpy-discussion] in place random generation

Robert Kern robert.kern@gmail....
Fri Mar 9 13:07:41 CST 2007

Mark P. Miller wrote:
> Robert Kern wrote:
>  > scipy.random is not a package. scipy/__init__.py does a "from numpy 
> import *"
>  > and thus pulls in numpy.random.
> Got it...and one more question:
> What about using something like
> from numpy.random import mtrand
> And then using mtrand.seed and mtrand.normal in code?
> Would this by any chance get around some of the code that seems to be 
> slowing down the random number generators when one can't efficiently use 
> arrays of random numbers?

No, all of the symbols exposed by numpy.random are just aliases to those in
mtrand, too.

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