diff --git a/pysindy/optimizers/stable_linear_sr3.py b/pysindy/optimizers/stable_linear_sr3.py index fd1cdd704..106e784b6 100644 --- a/pysindy/optimizers/stable_linear_sr3.py +++ b/pysindy/optimizers/stable_linear_sr3.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import warnings from typing import Tuple @@ -205,7 +207,7 @@ def _create_var_and_part_cost( y: np.ndarray, coef_sparse: np.ndarray, coef_neg_def: np.ndarray, - ) -> Tuple[cp.Variable, cp.Expression]: + ) -> Tuple["cp.Variable", "cp.Expression"]: xi = cp.Variable(coef_sparse.shape[0] * coef_sparse.shape[1]) cost = cp.sum_squares(x @ xi - y.flatten()) cost = cost + cp.sum_squares(xi - coef_neg_def.flatten()) / (2 * self.nu)