Coverage for gpkit/constraints/sigeq.py: 100%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"Implements SignomialEquality"
2from .set import ConstraintSet
3from ..nomials import SingleSignomialEquality as SSE
4from ..nomials.array import array_constraint as arrify
7class SignomialEquality(ConstraintSet):
8 "A constraint of the general form posynomial == posynomial"
10 def __init__(self, left, right):
11 if hasattr(left, "shape") or hasattr(right, "shape"):
12 ConstraintSet.__init__(self, arrify("=", SSE)(left, right))
13 else:
14 ConstraintSet.__init__(self, [SSE(left, right)])