See #171
This pattern, which is found in several files,
while i < max_iter and error > tol:
...
if i == max_iter:
print("Failed to converge!")
if verbose and i < max_iter:
print(f"\nConverged in {i} iterations.")
should be corrected to, e.g.,
if error > tol:
print("Failed to converge!")
elif verbose:
print(f"\nConverged in {i} iterations.")