The dictionary is also sorted so that it can be tested repeatably.
- EXAMPLES:
+ Examples
+ --------
>>> d = {'foo': 1.234, 'bar': matrix([1,2,3])}
>>> print(_pretty_format_dict(d))
class GameUnsolvableException(Exception):
"""
- Every linear game has a solution (this follows from a general
- min-max theorem). If we can't solve the conic program associated
- with a linear game, then something is wrong with either the model of
- the input.
+ An exception raised when a game cannot be solved.
- EXAMPLES:
+ Every linear game has a solution. If we can't solve the conic
+ program associated with a linear game, then something is wrong with
+ either the model or the input, and this exception should be raised.
+
+ Parameters
+ ----------
+
+ solution_dict : dict
+ The solution dictionary returned from the failed cone program.
+
+ Examples
+ --------
>>> d = {'residual as dual infeasibility certificate': None,
... 'y': matrix([1,1]),
def __init__(self, solution_dict):
"""
Create a new GameUnsolvableException object.
-
- INPUT:
-
- - ``solution_dict`` -- the solution dictionary returned from the
- cone program.
-
"""
super().__init__()
self._solution_dict = solution_dict