[SciPy-User] rejection sampling

josef.pktd@gmai... josef.pktd@gmai...
Mon Aug 8 02:42:55 CDT 2011

I got started a bit with rejection sampling.

for example scipy.stats.rdist has a very slow random number generator.
for shape parameters>=2 and not very large, rejection sampling works
much faster. (for shape parameter <2, the pdf of rdist is unbound and
rejection sampling against uniform doesn't work)

attached is just the first version to show that it works.

Does someone already have a more complete version that could be shared?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: try_sampling_reject.py
Type: text/x-python
Size: 1381 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20110808/1292f5e2/attachment.py 

More information about the SciPy-User mailing list