Skip to content

Commit

Permalink
Fixed import error with Tuple(cp)
Browse files Browse the repository at this point in the history
  • Loading branch information
akaptano committed Dec 1, 2023
1 parent 2633ee0 commit 638e4bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pysindy/optimizers/stable_linear_sr3.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import warnings
from typing import Tuple

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 638e4bb

Please sign in to comment.