summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-06-07 18:14:37 +0200
committerNao Pross <np@0hm.ch>2024-06-07 18:14:37 +0200
commit28deb5fa4d865f4b376570f27465e3e7abc631bc (patch)
tree54a7e1d7c84acd0a5ce892da2481c9abc85f1554
parentAdd more __str__ methods to expression mixins (diff)
downloadpolymatrix-28deb5fa4d865f4b376570f27465e3e7abc631bc.tar.gz
polymatrix-28deb5fa4d865f4b376570f27465e3e7abc631bc.zip
Fix bug in MaxExpr
Diffstat (limited to '')
-rw-r--r--polymatrix/expression/mixins/maxexprmixin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/polymatrix/expression/mixins/maxexprmixin.py b/polymatrix/expression/mixins/maxexprmixin.py
index 30d3917..dab842d 100644
--- a/polymatrix/expression/mixins/maxexprmixin.py
+++ b/polymatrix/expression/mixins/maxexprmixin.py
@@ -51,7 +51,7 @@ class MaxExprMixin(ExpressionBaseMixin):
elif ncols == 1:
maximum = None
for row in range(nrows):
- if poly := underlying.at(row, col):
+ if poly := underlying.at(row, 0):
if poly.degree > 0:
raise ValueError("Cannot take maximum of non-costant vector. "
f"Entry at {(row, 0)} has degree {poly.degree}.")