diff options
author | Nao Pross <np@0hm.ch> | 2024-05-05 16:39:24 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-05-05 16:39:24 +0200 |
commit | 57d53914965f8600fda606c0482f75a31f27cee8 (patch) | |
tree | 329971c72701e467c2aca36c4aeea2a95d9d1d3f | |
parent | Remove OptVariableExpression, just return a VariableExpression with OptVariab... (diff) | |
download | sumofsquares-57d53914965f8600fda606c0482f75a31f27cee8.tar.gz sumofsquares-57d53914965f8600fda606c0482f75a31f27cee8.zip |
Add __str__ to OptVariable
-rw-r--r-- | sumofsquares/optvariable.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sumofsquares/optvariable.py b/sumofsquares/optvariable.py index 4c687de..ab450f8 100644 --- a/sumofsquares/optvariable.py +++ b/sumofsquares/optvariable.py @@ -35,6 +35,9 @@ class OptVariableImpl(OptVariableMixin): name: str shape: tuple[int, int] + def __str__(self): + return self.name + def init_opt_variable_expr(name, shape): return OptVariableImpl(name, shape) |