Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lectures/career.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,9 @@ def solve_model(cw,
print(f"Error at iteration {i} is {error}.")
v = v_new

if i == max_iter:
print("Failed to converge!")

if verbose and i < max_iter:
if i == max_iter and error > tol:
print("Failed to converge!"
elif verbose:
print(f"\nConverged in {i} iterations.")

return v_new
Expand Down