[SciPy-user] Monte Carlo package

Robert Kern robert.kern at gmail.com
Wed Jan 25 10:24:59 CST 2006

David Huard wrote:
> It builds fine on linux Ubuntu and the example you gave in the mail
> works fine, however, I'm not sure I understand your question about rand().
> Here is what I get :
>>>> from scipy.sandbox.montecarlo import *
>>>> rand()
> NameError: name 'rand' is not defined

I am referring to the POSIX rand() function in C, which the current version of
the montecarlo package uses to seed a faster generator.

> If I may ask a question, is there a routine in scipy to generate random
> samples from a continuous distribution ?

Which distribution? numpy.random has plenty of standard continuous distribution
generators. scipy.stats.distributions defines a whole slew of distribution
objects, each of which has an .rvs() method which samples from the given

Robert Kern
robert.kern at gmail.com

"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