summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-05-07 00:31:14 +0200
committerNao Pross <np@0hm.ch>2024-05-07 00:31:14 +0200
commit7f26976a32513540d94dff3fc5bf3d7d2033f7e4 (patch)
tree435ad8c7c1583f9e9319ea1c8a774737f2db6ec3
parentAdd grouping of affine coefficients by variables (diff)
downloadpolymatrix-7f26976a32513540d94dff3fc5bf3d7d2033f7e4.tar.gz
polymatrix-7f26976a32513540d94dff3fc5bf3d7d2033f7e4.zip
Fix bug in constructor of PolyMatrixAsAffineExpr
-rw-r--r--polymatrix/polymatrix/init.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/polymatrix/polymatrix/init.py b/polymatrix/polymatrix/init.py
index af09111..6fcdcb1 100644
--- a/polymatrix/polymatrix/init.py
+++ b/polymatrix/polymatrix/init.py
@@ -67,7 +67,7 @@ def to_affine_expression(p: PolyMatrixMixin) -> PolyMatrixAsAffineExpressionMixi
# Generate slices to index sub-matrices
slices = {
- m: tuple(range(i*ncols, (i+1)*ncols))
+ m: tuple(range(i*ncols, (i+1)*ncols +1))
for i, m in enumerate(monomials)
}