MCPcopy Create free account
hub / github.com/cvxpy/cvxpy / is_concave

Method is_concave

cvxpy/transforms/partial_optimize.py:139–143  ·  view source on GitHub ↗

Is the expression concave?

(self)

Source from the content-addressed store, hash-verified

137 type(self.args[0].objective) == Minimize
138
139 def is_concave(self) -> bool:
140 """Is the expression concave?
141 """
142 return self.args[0].is_dcp() and \
143 type(self.args[0].objective) == Maximize
144
145 def is_linearizable_convex(self) -> bool:
146 return self.is_convex()

Callers 2

gradMethod · 0.95

Calls 2

typeClass · 0.85
is_dcpMethod · 0.45

Tested by

no test coverage detected