You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey!
Using symengine, I was trying to check whether a given expression is polynomial.
In the C++ documentation there exists a method is_polynomial() which would be exactly what I was looking for. This method however does not seem to exist in the python bindings (as of version 0.11.0).
Using the given is_finite propery sadly doesn't work and produces some interesting result when compared to SymPy
importsymengineasseimportsympyasspexpr=se.zoo# 👇 Is this the way it should behave? If yes, why?print(se.S(expr).is_finite) # Noneprint(sp.S(expr).is_finite) # Falseexpr="x ** 5"# As expected...print(se.S(expr).is_finite) # Noneprint(sp.S(expr).is_finite) # None# However, this behavior is what I wantprint(sp.S(expr).is_polynomial()) # True
Are there any plans of making the function accessible? Is there a workaround (without simply using SymPy)?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Assumptions are not yet implemented in SymEngine. So almost all .is_xxxxx methods will return None (which signifies "indeterminate").
Looks like is_polynomial would be useful in the python bindings. I think it's just a matter of someone finding the time / having the need to write a pull request.
Hey!
Using
symengine
, I was trying to check whether a given expression is polynomial.In the C++ documentation there exists a method
is_polynomial()
which would be exactly what I was looking for. This method however does not seem to exist in the python bindings (as of version0.11.0
).Using the given
is_finite
propery sadly doesn't work and produces some interesting result when compared toSymPy
Are there any plans of making the function accessible? Is there a workaround (without simply using
SymPy
)?Thanks in advance!
The text was updated successfully, but these errors were encountered: