Skip to content

Avoid infinite loops #71

Description

@ddundo

There is a potential infinite while loop here:

while not abs(np.median(calving_k_values) - calving_k) < 0.001:
calving_k_values = calving_k + np.random.normal(loc=0, scale=calving_k_nmad, size=nsims)
calving_k_values[calving_k_values < 0.001] = 0.001
calving_k_values[calving_k_values > 5] = 5

This caused #58 to hang (i.e., the while loop was never broken).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions