Random number generation from functions

Colin J. Williams cjw at sympatico.ca
Tue Nov 30 02:00:39 CET 2004

drs wrote:
> Is there any way to generate random numbers based on arbitrary real valued
> functions? I am looking for something like random.gauss() but with natural
> log and exponential functions.
> thanks,
> -d
numarray has a random package which provides a number of functions, 
including: normal(  	mean, stddev, shape=[])

That may serve your need.

Colin W.

More information about the Python-list mailing list