def test_function_distribution(N=1000, rseed=0):
    f = norm(0, 1).pdf
    dist = FunctionDistribution(f, (- 10), 10)
    np.random.seed(rseed)
    X = dist.rvs(N)
    meanX = X.mean()
    stdX = X.std()
    assert_allclose([meanX, stdX], [0, 1], atol=(3 / np.sqrt(N)))
def test_function_distribution(N=1000, rseed=0):
    f = norm(0, 1).pdf
    dist = FunctionDistribution(f, (- 10), 10)
    np.random.seed(rseed)
    X = dist.rvs(N)
    meanX = X.mean()
    stdX = X.std()
    assert_allclose([meanX, stdX], [0, 1], atol=(3 / np.sqrt(N)))