diff --git a/src/probnum/problems/zoo/quad/_quadproblems_gaussian.py b/src/probnum/problems/zoo/quad/_quadproblems_gaussian.py index aa300a9b3..608f37622 100644 --- a/src/probnum/problems/zoo/quad/_quadproblems_gaussian.py +++ b/src/probnum/problems/zoo/quad/_quadproblems_gaussian.py @@ -59,7 +59,7 @@ def uniform_to_gaussian_quadprob( where :math:`h(x)=f(\Phi((x-mean)/var))`, :math:`\phi(x)` is the Gaussian probability density function and :math:`\Phi(x)` an elementwise application of the - Gaussian cummulative distribution function. See [1]_. + Gaussian cumulative distribution function. See [1]_. Parameters ---------- @@ -87,7 +87,12 @@ def uniform_to_gaussian_quadprob( Example ------- - uniform_to_gaussian_quadprob(genz_continuous(1)) + Convert the uniform continuous Genz problem to a Gaussian quadrature problem. + >>> import numpy as np + >>> from probnum.problems.zoo.quad import genz_continuous + >>> gaussian_quadprob = uniform_to_gaussian_quadprob(genz_continuous(1)) + >>> gaussian_quadprob.fun(np.array([[0.]])) + array([[1.]]) References ---------- diff --git a/tests/test_problems/test_zoo/test_quad/test_quadproblems_gaussian.py b/tests/test_problems/test_zoo/test_quad/test_quadproblems_gaussian.py index df932036b..6d8139287 100644 --- a/tests/test_problems/test_zoo/test_quad/test_quadproblems_gaussian.py +++ b/tests/test_problems/test_zoo/test_quad/test_quadproblems_gaussian.py @@ -172,7 +172,7 @@ def test_negative_values_for_b_in_sum_polynomials_raises(): OtherIntegrandsGaussianCases, ), ) -def test_genz_gaussian(quadprob: QuadratureProblem, rtol: float): +def test_gaussian_quadprob(quadprob: QuadratureProblem, rtol: float): """Compare a Monte Carlo estimator against Gaussian measure with a very large number of samples to the true value of the integral.