From c46bfc3635455e1c57e314faa5333d859d32801d Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sun, 5 May 2024 18:25:27 +0200 Subject: Fix indexing bug in OptVariableMixin --- sumofsquares/optvariable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1