diff options
Diffstat (limited to '')
-rw-r--r-- | polymatrix/expression/mixins/combinationsexprmixin.py | 6 |
1 files 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)) |