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
PolynomialError when I try to call classify_ode #23425
Labels
Comments
Maybe something like this is needed: diff --git a/sympy/solvers/ode/hypergeometric.py b/sympy/solvers/ode/hypergeometric.py
index b159053048..e0c42482b4 100644
--- a/sympy/solvers/ode/hypergeometric.py
+++ b/sympy/solvers/ode/hypergeometric.py
@@ -50,6 +50,8 @@ def match_2nd_hypergeometric(eq, func):
n, d = eq.as_numer_denom()
eq = expand(n)
r = collect(eq, [func.diff(x, 2), func.diff(x), func]).match(deq)
+ if not all(val.is_polynomial() for val in r.values()):
+ return []
if r and r[a3]!=0:
A = cancel(r[b3]/r[a3]) I'm not sure exactly what the restrictions are for the 2nd hypergeometric method. I guess the coefficients should be required to be polynomial in the dependent variable. |
skirpichev
added a commit
to skirpichev/diofant
that referenced
this issue
Apr 27, 2022
skirpichev
added a commit
to skirpichev/diofant
that referenced
this issue
Apr 27, 2022
skirpichev
added a commit
to skirpichev/diofant
that referenced
this issue
Apr 28, 2022
skirpichev
added a commit
to skirpichev/diofant
that referenced
this issue
Apr 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The error:
The text was updated successfully, but these errors were encountered: