summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--polymatrix/polymatrix/init.py2
-rw-r--r--polymatrix/polymatrix/mixins.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/polymatrix/polymatrix/init.py b/polymatrix/polymatrix/init.py
index 332977e..d45b02e 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 +1))
+ m: tuple(range(i*ncols, (i+1)*ncols))
for i, m in enumerate(monomials)
}
diff --git a/polymatrix/polymatrix/mixins.py b/polymatrix/polymatrix/mixins.py
index 7313a8e..4dcd6f7 100644
--- a/polymatrix/polymatrix/mixins.py
+++ b/polymatrix/polymatrix/mixins.py
@@ -355,7 +355,7 @@ class PolyMatrixAsAffineExpressionMixin(
nrows, _ = self.shape
return np.zeros((nrows, 1))
- columns = range(*self.slices[monomial])
+ columns = self.slices[monomial]
return self.affine_coefficients[:, columns]
def affine_coefficients_by_degrees(self) -> Iterable[tuple[int, MatrixType]]: