Skip to content

Commit 72cdcd7

Browse files
committed
Fix incorrect error with x + x*x in Python API
1 parent d61b196 commit 72cdcd7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

python/cuopt/cuopt/linear_programming/problem.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ def __add__(self, other):
204204
return LinearExpression([self, other], [1.0, 1.0], 0.0)
205205
case LinearExpression():
206206
return other + self
207+
case QuadraticExpression():
208+
return other + self
207209
case _:
208210
raise ValueError(
209211
"Cannot add type %s to variable" % type(other).__name__

0 commit comments

Comments
 (0)