summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Schneeberger <michael.schneeberger@fhnw.ch>2023-02-13 15:04:21 +0100
committerMichael Schneeberger <michael.schneeberger@fhnw.ch>2023-02-13 15:04:21 +0100
commitaa51aa134c8a721e927fcbb24a4920e7e0fcc539 (patch)
treeb8306c03825aba5f8a26b131a32003276cdfd5de
parentadd to_sorted_variables operator (diff)
downloadpolymatrix-aa51aa134c8a721e927fcbb24a4920e7e0fcc539.tar.gz
polymatrix-aa51aa134c8a721e927fcbb24a4920e7e0fcc539.zip
correct bug in to_sorted_variables operator
-rw-r--r--polymatrix/expression/mixins/tosortedvariablesmixin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/polymatrix/expression/mixins/tosortedvariablesmixin.py b/polymatrix/expression/mixins/tosortedvariablesmixin.py
index 490604d..d839ef7 100644
--- a/polymatrix/expression/mixins/tosortedvariablesmixin.py
+++ b/polymatrix/expression/mixins/tosortedvariablesmixin.py
@@ -23,7 +23,7 @@ class ToSortedVariablesMixin(ExpressionBaseMixin):
def gen_sorted_vector():
for row, index in enumerate(sorted(variable_indices)):
- yield (row, 1), {(index, 1): 1}
+ yield (row, 1), {((index, 1),): 1}
poly_matrix = init_poly_matrix(
terms=dict(gen_sorted_vector()),