Comment #12 on issue 1598 by asmeurer: New polynomials manipulation module
http://code.google.com/p/sympy/issues/detail?id=1598

It looks like factor also chokes on reals, and you have a bug:
>>> factor(x*(y + z)**(1/2)*(1 + y))
Traceback (most recent call last):
   File "<console>", line 1, in <module>
   File "./sympy/polys/polytools.py", line 1839, in factor
     F = Poly(f, *gens, **args)
   File "./sympy/polys/polytools.py", line 435, in __new__
     result = _init_poly_from_basic(rep, *gens, **args)
   File "./sympy/polys/polytools.py", line 367, in _init_poly_from_basic
     rep, gens = dict_from_basic(ex, **args)
   File "./sympy/polys/polyutils.py", line 168, in dict_from_basic
     return _dict_from_basic_no_gens(ex, **args)
   File "./sympy/polys/polyutils.py", line 123, in _dict_from_basic_no_gens
     base, exp = _analyze_power(*factor.as_Pow())
   File "./sympy/polys/polyutils.py", line 65, in _analyze_power
     raise PolynomialError("%s is not a valid polynomial term" % term)
NameError: global name 'term' is not defined

It would be nice if factor just returned the expression if it can't do it,  
instead of raising PolynomialError.  That
way, you don't have to have a try block every time you want to factor  
something.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to