mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-27 05:46:24 +02:00
migrate quadrature_tests to pytest
This commit is contained in:
parent
97741d6b41
commit
de670f8bcb
1 changed files with 1 additions and 4 deletions
|
|
@ -3,16 +3,13 @@ import numpy as np
|
||||||
from ..util.quad_integrate import quadgk_int, quadvgk
|
from ..util.quad_integrate import quadgk_int, quadvgk
|
||||||
|
|
||||||
|
|
||||||
class QuadTests(np.testing.TestCase):
|
class TestQuad:
|
||||||
"""
|
"""
|
||||||
test file for checking implementation of gaussian-kronrod quadrature.
|
test file for checking implementation of gaussian-kronrod quadrature.
|
||||||
we will take a function which can be integrated analytically and check if quadgk result is similar or not!
|
we will take a function which can be integrated analytically and check if quadgk result is similar or not!
|
||||||
through this file we can test how numerically accurate quadrature implementation in native numpy or manual code is.
|
through this file we can test how numerically accurate quadrature implementation in native numpy or manual code is.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_infinite_quad(self):
|
def test_infinite_quad(self):
|
||||||
def f(x):
|
def f(x):
|
||||||
return np.exp(-0.5 * x**2) * np.power(x, np.arange(3)[:, None])
|
return np.exp(-0.5 * x**2) * np.power(x, np.arange(3)[:, None])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue