summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Schneeberger <michael.schneeberger@fhnw.ch>2022-08-17 17:31:26 +0200
committerMichael Schneeberger <michael.schneeberger@fhnw.ch>2022-08-17 17:31:26 +0200
commitd0b3561c66cc762bb5498f4e8b24bfb656ed7fa3 (patch)
tree9229e8ccccac946bb9fd30bb5d123e96dd4a3f13
parentbugfix: 'set_element_at' works with value=0 (diff)
downloadpolymatrix-d0b3561c66cc762bb5498f4e8b24bfb656ed7fa3.tar.gz
polymatrix-d0b3561c66cc762bb5498f4e8b24bfb656ed7fa3.zip
bugfix: 'get_variable_indices' returns updated state instead of the old state
-rw-r--r--polymatrix/expression/utils/getvariableindices.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/polymatrix/expression/utils/getvariableindices.py b/polymatrix/expression/utils/getvariableindices.py
index 7010d23..08b44d3 100644
--- a/polymatrix/expression/utils/getvariableindices.py
+++ b/polymatrix/expression/utils/getvariableindices.py
@@ -33,6 +33,6 @@ def get_variable_indices(state, variables):
yield variable
else:
- yield state.offset_dict[variable][0]
+ yield global_state[0].offset_dict[variable][0]
- return state, tuple(gen_indices())
+ return global_state[0], tuple(gen_indices())