diff options
Diffstat (limited to '')
-rw-r--r-- | polymatrix/expressionstate/mixins.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/polymatrix/expressionstate/mixins.py b/polymatrix/expressionstate/mixins.py index 71add07..36dc5e7 100644 --- a/polymatrix/expressionstate/mixins.py +++ b/polymatrix/expressionstate/mixins.py @@ -35,7 +35,6 @@ class ExpressionStateMixin( def index(self, var: Variable) -> tuple[ExpressionStateMixin, IndexRange]: """ Index a variable and get its index range. """ - # Unwrap if wrapped in expression object if not isinstance(var, Variable): raise ValueError("State can only index object of type Variable!") @@ -50,7 +49,7 @@ class ExpressionStateMixin( return dataclasses.replace( self, n_variables=self.n_variables + size, - indices={**self.indices, var: index} + indices=self.indices | {var: index} ), index def register(self, var: Variable) -> ExpressionStateMixin: |