def test_cubature_three_exact(): d = 8 xmin = -np.ones((d,)) xmax = np.ones((d,)) val = ti.cubature_three_exact(xmin, xmax) assert np.abs(val) < 1e-14 xmin = np.zeros((d,)) xmax = np.ones((d,)) val = ti.cubature_three_exact(xmin, xmax) assert np.abs(val - 1) < 1e-14
def test_cubature_three_exact(): d = 8 xmin = -np.ones((d, )) xmax = np.ones((d, )) val = ti.cubature_three_exact(xmin, xmax) assert np.abs(val) < 1e-14 xmin = np.zeros((d, )) xmax = np.ones((d, )) val = ti.cubature_three_exact(xmin, xmax) assert np.abs(val - 1) < 1e-14
def test_hcubature_cubature_three(): d = 8 xmin = np.zeros((d,)) xmax = np.ones((d,)) exact = ti.cubature_three_exact(xmin, xmax) val, err = cubature(ti.cubature_three, d, 1, xmin, xmax) assert np.allclose([exact], [val])
def test_hcubature_cubature_three(): d = 8 xmin = np.zeros((d, )) xmax = np.ones((d, )) exact = ti.cubature_three_exact(xmin, xmax) val, err = cubature(ti.cubature_three, d, 1, xmin, xmax) assert np.allclose([exact], [val])