Skip to content

changed several places where np.seterr was being called in order to keep the changes localized.#58

Merged
eshendricks merged 1 commit intoOpenMDAO:masterfrom
naylor-b:fix_error_handling
Jul 25, 2023
Merged

changed several places where np.seterr was being called in order to keep the changes localized.#58
eshendricks merged 1 commit intoOpenMDAO:masterfrom
naylor-b:fix_error_handling

Conversation

@naylor-b
Copy link
Member

In several places in pyCycle the global error handling behavior was being set via np.seterr and was either not reset at all after the numerical operation was complete or was reset to some specific behavior like 'warn' which would override any previous settings. This made it impossible to set the global error behavior while debugging a specific model that has pyCycle systems in it. This PR puts a try..finally block around the numerical operation(s) and restores the previous behavior of np.seterr afterward.

@eshendricks eshendricks merged commit d2f89d4 into OpenMDAO:master Jul 25, 2023
@naylor-b naylor-b deleted the fix_error_handling branch July 25, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants