diff options
author | Nao Pross <np@0hm.ch> | 2024-06-08 14:49:51 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-06-08 14:49:51 +0200 |
commit | 8507da2dee17d7ab42e6b791f3dc7ff8b25e9531 (patch) | |
tree | 2380bee5ac3f4c0b91999c1ce7614b267d7d11de | |
parent | Fix row-wise interpretation of NonNegative, improve error messages (diff) | |
download | sumofsquares-8507da2dee17d7ab42e6b791f3dc7ff8b25e9531.tar.gz sumofsquares-8507da2dee17d7ab42e6b791f3dc7ff8b25e9531.zip |
Temporarily disable half_newton_polytope
-rw-r--r-- | sumofsquares/canon.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sumofsquares/canon.py b/sumofsquares/canon.py index bec9cf0..97a271b 100644 --- a/sumofsquares/canon.py +++ b/sumofsquares/canon.py @@ -127,10 +127,10 @@ class PutinarPSatz(Canonicalization): if d.read(state).scalar().constant() % 2 != 0: d += 1 - monomials = x.combinations(poly.arange(d + 1)).half_newton_polytope(x) - coeffs = opt_variable_from_name(rf"\gamma_{i},c", shape=monomials.shape) + monomials = x.combinations(poly.arange(d + 1)) #.half_newton_polytope(x) + coeffs = opt_variable_from_name(rf"\gamma_{i},z", shape=monomials.shape) - multiplier = poly.give_name(coeffs.T @ monomials, rf"\gamma_{i},c") + multiplier = poly.give_name(coeffs.T @ monomials, rf"\gamma_{i},z") new_constr = constr.expression - multiplier # Add other terms of the quadratic module @@ -162,7 +162,7 @@ class PutinarPSatz(Canonicalization): # TODO: better documentation # Generate monomials of up to degree d and take only monomials # that are in half of the newton polytope - monomials = x.combinations(poly.arange(d + 1)).half_newton_polytope(x) + monomials = x.combinations(poly.arange(d + 1)) # .half_newton_polytope(x) coeffs = opt_variable_from_name(rf"\gamma_{i},{j}", shape=monomials.shape) multiplier = poly.give_name(coeffs.T @ monomials, rf"\gamma_{i},{j}") |