diff options
Diffstat (limited to '')
-rw-r--r-- | sumofsquares/canon.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sumofsquares/canon.py b/sumofsquares/canon.py index 295a892..94759f2 100644 --- a/sumofsquares/canon.py +++ b/sumofsquares/canon.py @@ -147,7 +147,10 @@ class PutinarPSatz(Canonicalization): # FIXME: need to check that there is not a \gamma_{i} already! # TODO: deterministically generate unique names - monomials = x.combinations(poly.arange(d + 1)) + # 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) c = opt_variable_from_name(rf"\gamma_{i}", shape=monomials.shape) multiplier = c.T @ monomials |