|
25 | 25 | from __future__ import annotations |
26 | 26 |
|
27 | 27 | from numbers import Integral, Real |
28 | | -from typing import Callable, ClassVar, Literal, Mapping, Optional, Sequence, Union |
| 28 | +from typing import Callable, Literal, Mapping, Optional, Sequence, Union |
29 | 29 |
|
30 | 30 | import numpy as np |
31 | 31 | import numpy.typing as npt |
@@ -156,14 +156,14 @@ class DiffusionGPR(GaussianProcessRegressor): |
156 | 156 |
|
157 | 157 | optimizer: Optional[Union[StrOptions, Callable, None]] = None |
158 | 158 |
|
159 | | - _parameter_constraints: ClassVar[dict] = { |
| 159 | + _parameter_constraints = { |
160 | 160 | "kernel": [None, Kernel], |
161 | | - "alpha": [Interval(Real, 0, None, closed="left"), np.ndarray], |
162 | | - "optimizer": [StrOptions(SUPPORTED_OPTIMIZERS), callable, None], |
163 | | - "n_restarts_optimizer": [Interval(Integral, 0, None, closed="left")], |
| 161 | + "alpha": [Interval(Real, 0, None, closed="left"), np.ndarray], # type: ignore |
| 162 | + "optimizer": [StrOptions(SUPPORTED_OPTIMIZERS), callable, None], # type: ignore |
| 163 | + "n_restarts_optimizer": [Interval(Integral, 0, None, closed="left")], # type: ignore |
164 | 164 | "copy_X_train": ["boolean"], |
165 | 165 | "normalize_y": ["boolean"], |
166 | | - "n_targets": [Interval(Integral, 1, None, closed="left"), None], |
| 166 | + "n_targets": [Interval(Integral, 1, None, closed="left"), None], # type: ignore |
167 | 167 | "random_state": ["random_state"], |
168 | 168 | } |
169 | 169 |
|
|
0 commit comments