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

Handle input containing division by zero better #77

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

clinssen
Copy link
Contributor

In case of numerical issues with the input, throw a user-friendly error, like:

NumericalIssueException: The variable "zoo" was found. This indicates a numerical problem while solving the system of ODEs. Please check the input for correctness (such as the presence of divisions by zero).

odetoolbox/sympy_helpers.py Outdated Show resolved Hide resolved
@clinssen
Copy link
Contributor Author

Sadly, sympy 1.4 seems to not work well with newer Python versions (starting from 3.9). This is probably triggered now by fixing the bug where "Mul" was missing from the list of sympy operators. If #70 is merged, we can drop support for sympy 1.4 altogether. I would suggest to wait for that PR to be merged first.

@clinssen clinssen marked this pull request as draft November 21, 2024 13:07
@clinssen clinssen marked this pull request as ready for review December 4, 2024 14:06
@@ -43,7 +43,7 @@ jobs:
fail-fast: false
matrix:
with_gsl: ["0", "1"]
sympy_version: ["==1.4", ""] # empty string for "latest"
sympy_version: [""] # empty string for "latest"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove sympy_version altogether?

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

Successfully merging this pull request may close these issues.

2 participants