sympy/sympy — pull request #1572 by hastebrot (2012-10-12 16:36:42+00:00)
Title: Added sampling_density to sympy.stats

This PR adds `numsamples` to `density()` in `sympy.stats`.

~~~python
>>> from sympy.stats import *
>>> X = Die("X")
>>> density(X)
{6: 1/6, 2: 1/6, 1: 1/6, 4: 1/6, 3: 1/6, 5: 1/6}
>>> density(X, numsamples=600)
{6: 92, 2: 98, 1: 107, 4: 87, 3: 112, 5: 104}
>>> density(X, X > 3, numsamples=600)
{4: 188, 6: 213, 5: 199}
~~~

--Benjamin