Skip to content

Commit a0c4995

Browse files
committed
Directly compare with operators
1 parent 06f8ebc commit a0c4995

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pyscipopt/matrix.pxi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ def _is_number(e):
2020
def _matrixexpr_richcmp(self, other, op):
2121
def _richcmp(self, other, op):
2222
if op == 1: # <=
23-
return self.__le__(other)
23+
return self <= other
2424
elif op == 5: # >=
25-
return self.__ge__(other)
25+
return self >= other
2626
elif op == 2: # ==
27-
return self.__eq__(other)
27+
return self == other
2828
else:
2929
raise NotImplementedError("Can only support constraints with '<=', '>=', or '=='.")
3030

0 commit comments

Comments
 (0)