We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
total_degree
Just as there is a degree function and a Poly.degree method, a total_degree function could be added to polys.polytools.
degree
Poly.degree
Perhaps something like the following:
def total_degree(f): f = sympify(f) if f.is_Poly: rv = f.total_degree() elif f.is_Number: rv = 0 else: rv = Poly(f).total_degree() # the Poly method returns int; SymPy functions return SymPy objects return Integer(rv)
The text was updated successfully, but these errors were encountered:
It should also allow to specify the generators. It should match the other polys functions in its form.
Sorry, something went wrong.
specify the generators
ahh...so total_degree(x*y + z**3, x, y) gives 2 instead of 3?
total_degree(x*y + z**3, x, y)
Yes
>>> Poly(x*y + z**3, x, y).total_degree() 2
Anything not in the generators should be thought of as a symbolic constant.
@smichr I would like to work on this.
No branches or pull requests
Just as there is a
degree
function and aPoly.degree
method, atotal_degree
function could be added to polys.polytools.Perhaps something like the following:
The text was updated successfully, but these errors were encountered: