|
5 | 5 | from collections import defaultdict |
6 | 6 | from copy import deepcopy |
7 | 7 | from math import hypot |
| 8 | +from numbers import Integral as Int |
| 9 | +from numbers import Real |
8 | 10 | from typing import Callable, DefaultDict, Iterable, List, Sequence, Tuple |
9 | 11 |
|
10 | 12 | import numpy as np |
|
14 | 16 |
|
15 | 17 | from adaptive.learner.learner1D import Learner1D, _get_intervals |
16 | 18 | from adaptive.notebook_integration import ensure_holoviews |
17 | | -from adaptive.types import Int, Real |
18 | 19 | from adaptive.utils import assign_defaults, partial_function_from_dataframe |
19 | 20 |
|
20 | 21 | try: |
@@ -576,10 +577,10 @@ def tell_many_at_point(self, x: Real, seed_y_mapping: dict[int, Real]) -> None: |
576 | 577 | self._update_interpolated_loss_in_interval(*interval) |
577 | 578 | self._oldscale = deepcopy(self._scale) |
578 | 579 |
|
579 | | - def _get_data(self) -> dict[Real, Real]: |
| 580 | + def _get_data(self) -> dict[Real, dict[Int, Real]]: |
580 | 581 | return self._data_samples |
581 | 582 |
|
582 | | - def _set_data(self, data: dict[Real, Real]) -> None: |
| 583 | + def _set_data(self, data: dict[Real, dict[Int, Real]]) -> None: |
583 | 584 | if data: |
584 | 585 | for x, samples in data.items(): |
585 | 586 | self.tell_many_at_point(x, samples) |
|
0 commit comments