From bb6e0746666c7d41a9c5eaac17e6d42920806247 Mon Sep 17 00:00:00 2001 From: Michael Schneeberger Date: Mon, 13 Feb 2023 15:06:39 +0100 Subject: correct another bug in to_sorted_variables operator --- polymatrix/expression/mixins/tosortedvariablesmixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymatrix/expression/mixins/tosortedvariablesmixin.py b/polymatrix/expression/mixins/tosortedvariablesmixin.py index d839ef7..441634b 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, 0), {((index, 1),): 1} poly_matrix = init_poly_matrix( terms=dict(gen_sorted_vector()), -- cgit v1.2.1