Skip to content

Commit 16c028b

Browse files
committed
fix test_tell_many_at_point
1 parent 68913b8 commit 16c028b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adaptive/learner/average_learner1D.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def _update_data_structures(self, x, y, point_type: str):
277277
self.rescaled_error.pop(x, None)
278278

279279
# We also need to update scale and losses
280-
super()._update_scale(x, y)
280+
self._update_scale(x, y)
281281
self._update_losses_resampling(x, real=True)
282282

283283
# If the scale has increased enough, recompute all losses.
@@ -396,7 +396,8 @@ def tell_many_at_point(self, x, ys):
396396
self._update_rescaled_error_in_mean(x, "resampled")
397397
if self.error[x] <= self.min_error or n >= self.max_samples:
398398
self.rescaled_error.pop(x, None)
399-
super()._update_scale(x, self.data[x])
399+
self._update_scale(x, min(self._data_samples[x]))
400+
self._update_scale(x, max(self._data_samples[x]))
400401
self._update_losses_resampling(x, real=True)
401402
if self._scale[1] > self._recompute_losses_factor * self._oldscale[1]:
402403
for interval in reversed(self.losses):

0 commit comments

Comments
 (0)