summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sumofsquares/cvxopt.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sumofsquares/cvxopt.py b/sumofsquares/cvxopt.py
index ce7b093..12f8e44 100644
--- a/sumofsquares/cvxopt.py
+++ b/sumofsquares/cvxopt.py
@@ -18,6 +18,13 @@ from .variable import OptVariable
class CVXOPTInfo(SolverInfo, UserDict):
""" Dictionary returned by CVXOPT. """
+ def __getattr__(self, attr):
+ key = " ".join(attr.split("_"))
+ if key not in self.keys():
+ raise KeyError(f"Key {key} was not found")
+ return self[key]
+
+
def solve_sos_cone(prob: Problem, verbose: bool = False, *args, **kwargs) -> tuple[dict[OptVariable, float], CVXOPTInfo]:
r"""