From 2b24df74cd6179e86cbe0bbf0f9d02ef23b1f8bd Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sun, 26 May 2024 19:30:18 +0200 Subject: Fix bug in CombinationExprMixin --- polymatrix/expression/mixins/combinationsexprmixin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polymatrix/expression/mixins/combinationsexprmixin.py b/polymatrix/expression/mixins/combinationsexprmixin.py index fdac6f5..ff2d201 100644 --- a/polymatrix/expression/mixins/combinationsexprmixin.py +++ b/polymatrix/expression/mixins/combinationsexprmixin.py @@ -50,15 +50,15 @@ class CombinationsExprMixin(ExpressionBaseMixin): # Scalars are OK nrows, ncols = deg_pm.shape if nrows == 1 and ncols == 1: - degrees = (deg_pm.at(0, 0).constant(),) + degrees = (deg_pm.scalar().constant(),) # Column vectors are OK - elif nrows == 1: + elif ncols == 1: degrees = (deg_pm.at(i, 0).constant() for i in range(nrows)) # Row vectors are OK - elif ncols == 1: + elif nrows == 1: degrees = (deg_pm.at(0, i).constant() for i in range(ncols)) -- cgit v1.2.1