summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-05-26 23:43:46 +0200
committerNao Pross <np@0hm.ch>2024-05-27 00:02:26 +0200
commit6d778eb3ed800bff229a7e93ac3d7c7f7cae09cb (patch)
treea80ddaaaa72f2c11d8ddfecad6d617ce1280fce0
parentFix bug in ExpressionState.get_variable_from_name_or (diff)
downloadpolymatrix-6d778eb3ed800bff229a7e93ac3d7c7f7cae09cb.tar.gz
polymatrix-6d778eb3ed800bff229a7e93ac3d7c7f7cae09cb.zip
Fix bug in ParametrizeExprMixin
Diffstat (limited to '')
-rw-r--r--polymatrix/expression/mixins/parametrizeexprmixin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/polymatrix/expression/mixins/parametrizeexprmixin.py b/polymatrix/expression/mixins/parametrizeexprmixin.py
index 0676cea..644198e 100644
--- a/polymatrix/expression/mixins/parametrizeexprmixin.py
+++ b/polymatrix/expression/mixins/parametrizeexprmixin.py
@@ -43,7 +43,7 @@ class ParametrizeExprMixin(ExpressionBaseMixin):
# FIXME: not sure this behaviour is intuitive, discuss
if v := state.get_variable_from_name_or(self.name, if_not_present=False):
- start, end = state.offset_dict[self.name]
+ start, end = state.offset_dict[v]
if (nrows * ncols) != (end - start):
raise ValueError("Cannot parametrize {self.underlying} with variable {v} "
"found in state object, because its shape {(nrow, ncols)} "