Skip to content

Commit efefd31

Browse files
committed
Update: test condition
1 parent 6d6597a commit efefd31

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test/retrieve/oe/test_oe_jax.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from uncertaintyx.f.jax import Tablet
1616
from uncertaintyx.retrieve.oe.jax import OE
1717

18-
ATOL = 1.0e-06
18+
ATOL = 1.0e-08
1919
"""The absolute tolerance for comparisons."""
2020

2121

@@ -201,11 +201,13 @@ def test_different_powers(self):
201201
"""
202202
f = DifferentPowers()
203203

204-
x = self.fuzzy(1.0, "x")
204+
x = self.fuzzy(2.0, "x")
205205
y = self.sharp(0.0, "y")
206206
result = OE().retrieve(f, x, y)
207207

208-
self.assertTrue(np.allclose(result.cost, 0.0, atol=ATOL))
208+
self.assertTrue(
209+
np.allclose(np.percentile(result.cost, 0.99), 0.0, atol=ATOL)
210+
)
209211

210212
def fuzzy(self, val, shape_like: Literal["x", "y"]) -> np.ndarray:
211213
"""Returns an array filled with fuzzy values."""

0 commit comments

Comments
 (0)