Skip to content

Commit

Permalink
Add print for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
noscode committed Jul 30, 2023
1 parent 61333e1 commit 642c297
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gadma/optimizers/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,5 +622,11 @@ def check_variables(self, variables):
"""
super(ConstrainedOptimizer, self).check_variables(variables)
for var in variables:
if isinstance(var, DiscreteVariable)
or np.all(var.domain != np.array([-np.inf, np.inf])):
print(var)
print(variables)
print(var.domain)
assert (isinstance(var, DiscreteVariable)
or np.all(var.domain != np.array([-np.inf, np.inf])))

0 comments on commit 642c297

Please sign in to comment.