Skip to content

BUG: Correct convergence conditions in function iteration #175

@oyamad

Description

@oyamad

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.")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions