random numbers according to user defined distribution ??

Jeremy Sanders jeremy+complangpython at jeremysanders.net
Fri Aug 8 08:43:08 EDT 2008


Alex wrote:

> I wonder if it is possible in python to produce random numbers
> according to a user defined distribution?
> Unfortunately the random module does not contain the distribution I
> need :-(

Have you looked at the numpy random number module? It seems to have quite a
lot of distributions. See help(numpy.random).

Jeremy

-- 
Jeremy Sanders
http://www.jeremysanders.net/



More information about the Python-list mailing list