summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-05-27 14:24:41 +0200
committerNao Pross <np@0hm.ch>2024-05-27 14:24:41 +0200
commit1ec26ed4d93743b7c40d63e15e2f030521d36b5a (patch)
tree342c6db82717ed5776f37a297e766c39713bdf26
parentExpose polymatrix.ones and polymatrix.zeros to user (diff)
downloadpolymatrix-1ec26ed4d93743b7c40d63e15e2f030521d36b5a.tar.gz
polymatrix-1ec26ed4d93743b7c40d63e15e2f030521d36b5a.zip
Fix bug in SubtractionExpr
Diffstat (limited to '')
-rw-r--r--polymatrix/expression/mixins/subtractionexprmixin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/polymatrix/expression/mixins/subtractionexprmixin.py b/polymatrix/expression/mixins/subtractionexprmixin.py
index 41b2509..f80f7e8 100644
--- a/polymatrix/expression/mixins/subtractionexprmixin.py
+++ b/polymatrix/expression/mixins/subtractionexprmixin.py
@@ -50,7 +50,7 @@ class SubtractionExprMixin(ExpressionBaseMixin):
if math.isclose(new_poly[monomial], 0):
del new_poly[monomial]
else:
- new_poly[monomial] = coeff
+ new_poly[monomial] = -coeff
result[*entry] = new_poly
return state, init_poly_matrix(result, left.shape)