diff options
author | Nao Pross <np@0hm.ch> | 2024-05-05 18:25:27 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-05-05 18:25:27 +0200 |
commit | c46bfc3635455e1c57e314faa5333d859d32801d (patch) | |
tree | 2207493c0145542fd1dae31af60d2ca0638e7bf6 | |
parent | Update after polymatrix.typing was renamed to polymatrix.index (diff) | |
download | sumofsquares-c46bfc3635455e1c57e314faa5333d859d32801d.tar.gz sumofsquares-c46bfc3635455e1c57e314faa5333d859d32801d.zip |
Fix indexing bug in OptVariableMixin
-rw-r--r-- | sumofsquares/optvariable.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sumofsquares/optvariable.py b/sumofsquares/optvariable.py index 5ee7cbc..6e933b6 100644 --- a/sumofsquares/optvariable.py +++ b/sumofsquares/optvariable.py @@ -15,7 +15,8 @@ class OptVariableMixin(ExpressionBaseMixin, Variable): """ Optimization (decision) variable. """ @override def apply(self, state: ExpressionState) -> tuple[ExpressionState, PolyMatrix]: - state, indices = state.index(self) + state = state.register(self) + indices = state.get_indices(self) p = PolyMatrixDict() rows, cols = self.shape |