Skip to content

Commit c67ebe7

Browse files
committed
add test_zero_mean
1 parent e439b79 commit c67ebe7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

adaptive/tests/test_average_learner.py

+8
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,11 @@ def test_avg_std_and_npoints():
4646
assert learner.npoints == len(learner.data)
4747
assert abs(learner.sum_f - values.sum()) < 1e-13
4848
assert abs(learner.std - std) < 1e-13
49+
50+
51+
def test_zero_mean():
52+
# see https://github.com/python-adaptive/adaptive/issues/275
53+
learner = AverageLearner(None, rtol=0.01)
54+
learner.tell(0, -1)
55+
learner.tell(1, 1)
56+
learner.loss()

0 commit comments

Comments
 (0)