aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-03-10 22:43:20 +0100
committerNao Pross <np@0hm.ch>2024-03-10 22:43:20 +0100
commitf4c8cd82086a24527e60dd292624c506b4455638 (patch)
treed9132b16070a7e9ffc3704ed79f93070d2031cda
parentAdd PolyIndex.as_multi_index for Newton polytope and minor cleanup (diff)
downloadmdpoly-f4c8cd82086a24527e60dd292624c506b4455638.tar.gz
mdpoly-f4c8cd82086a24527e60dd292624c506b4455638.zip
Fix PolyRingExpr.__neg__
-rw-r--r--mdpoly/algebra.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mdpoly/algebra.py b/mdpoly/algebra.py
index 1e4b775..1fbabda 100644
--- a/mdpoly/algebra.py
+++ b/mdpoly/algebra.py
@@ -168,7 +168,8 @@ class PolyRingExpr(Expr):
return PolyAdd(other, self)
def __neg__(self):
- return PolyMul(self._constant(-1), self)
+ # FIXME: Create PolyNeg?
+ return PolyMul(PolyConst(-1), self)
def __mul__(self, other):
self._assert_same_algebra(self, other)