summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polymatrix/expressionstate/mixins/expressionstatemixin.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/polymatrix/expressionstate/mixins/expressionstatemixin.py b/polymatrix/expressionstate/mixins/expressionstatemixin.py
index 6d2ded3..e08e1eb 100644
--- a/polymatrix/expressionstate/mixins/expressionstatemixin.py
+++ b/polymatrix/expressionstate/mixins/expressionstatemixin.py
@@ -31,11 +31,9 @@ class ExpressionStateMixin(
def auxillary_equations(self) -> dict[int, dict[tuple[int], float]]:
...
- def get_variable_from_offset(self, offset: int):
+ def get_key_from_offset(self, offset: int):
for variable, (start, end) in self.offset_dict.items():
- if offset == start:
- assert end - start == 1, f'{start=}, {end=}, {variable=}'
-
+ if start <= offset < end:
return variable
def register(