Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 25, 2023

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