diff options
author | Nao Pross <np@0hm.ch> | 2024-05-26 19:30:18 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-05-27 00:02:26 +0200 |
commit | 2b24df74cd6179e86cbe0bbf0f9d02ef23b1f8bd (patch) | |
tree | 530acef11dbcf26d98edb054a07d5d6f9620f3b4 | |
parent | Create poly.arange and ARangeExprMixin (diff) | |
download | polymatrix-2b24df74cd6179e86cbe0bbf0f9d02ef23b1f8bd.tar.gz polymatrix-2b24df74cd6179e86cbe0bbf0f9d02ef23b1f8bd.zip |
Fix bug in CombinationExprMixin
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)) |