Skip to content

Commit

Permalink
ci: update tolerances for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Gattocrucco committed Nov 20, 2023
1 parent f056709 commit a745a1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/GP/test_GP.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def checkgp(gp):
for k1 in keys:
for k2 in keys:
util.assert_allclose(prior[0, 0], prior[k1, k2], atol=1e-15, rtol=1e-15)
# TODO this seems to be comparing at f32 precision on Windows

# with functions
gp = preparegp()
Expand Down Expand Up @@ -508,6 +509,7 @@ def test_partial_derivative():
cov2 = gp.prior(0, raw=True)

util.assert_equal(cov1, cov2)
# TODO compares at f32 on Windows

def test_zero_covblock(rng):
gp = lgp.GP()
Expand Down
2 changes: 1 addition & 1 deletion tests/kernels/test_autoreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_real_complex():
add = list(np.arange(1, m + 1) * 0.1 + 1j)
c1 = lgp.AR(slnr=2 * n * [r], lnc=add)(0, lag)
c2 = lgp.AR(slnr=[], lnc=add + n * [r])(0, lag)
util.assert_allclose(c2, c1, atol=0, rtol=1e-7)
util.assert_allclose(c2, c1, atol=0, rtol=1e-6)

def test_ar0():
lag = np.arange(100)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_special.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_expm1x():
x = np.linspace(-2, 2, 10000)
y = _special.expm1x(x)
y2 = x * x / 2 * special.hyp1f1(1, 3, x)
np.testing.assert_array_max_ulp(y, y2, 11)
np.testing.assert_array_max_ulp(y, y2, 15)
y = _special.expm1x(x.astype('f'))
np.testing.assert_array_max_ulp(y, y2.astype('f'), 4)
test_util.check_grads(_special.expm1x, (x,), 2)
Expand Down Expand Up @@ -167,7 +167,7 @@ def test_gamma():
x = np.linspace(-100, 100, 1000)
g1 = special.gamma(x)
g2 = _special.gamma(x)
np.testing.assert_array_max_ulp(g2, g1, 1500)
np.testing.assert_array_max_ulp(g2, g1, 1600)

def _periodic_zeta(x, s):
with mpmath.workdps(32):
Expand Down

0 comments on commit a745a1e

Please sign in to comment.