Skip to content

Instantly share code, notes, and snippets.

@asmeurer
Created May 26, 2011 20:28
Show Gist options
  • Save asmeurer/994003 to your computer and use it in GitHub Desktop.
Save asmeurer/994003 to your computer and use it in GitHub Desktop.
poly fix
diff --git a/sympy/polys/polytools.py b/sympy/polys/polytools.py
index cb94fb9..588a1b3 100644
--- a/sympy/polys/polytools.py
+++ b/sympy/polys/polytools.py
@@ -5103,7 +5103,7 @@ def groebner(F, *gens, **args):
else:
return G
-def poly(expr, **args):
+def poly(expr, *gens, **args):
"""
Efficiently transform an expression into a polynomial.
@@ -5153,7 +5153,7 @@ def poly(expr, **args):
poly_terms.append(product)
if not poly_terms:
- result = Poly(expr, expand=False)
+ result = Poly(expr, *gens, **{'expand':False})
else:
result = poly_terms[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment