Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
eytanadler committed Jun 21, 2024
1 parent ded7b6a commit 788ac14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def get_objfunc(self, failFlag=False):
"""
# Initialize iters to infinite so the fail flag is never thrown on setup
iters = np.inf

def objfunc(xdict):
"""
This is a simple quadratic test function with linear constraints.
Expand All @@ -43,7 +44,7 @@ def objfunc(xdict):
for x in xdict.keys():
for j in range(nc):
funcs[conName][j] = (iCon + 1) * np.sum(xdict[x])

# Throw the fail flag if it's in the specified range or True
nonlocal iters
if isinstance(failFlag, tuple):
Expand Down

0 comments on commit 788ac14

Please sign in to comment.