Status: Accepted Owner: smichr Labels: Type-Defect Priority-Medium New issue 1559 by smichr: operations on Poly result in expressions but should perhaps be Poly http://code.google.com/p/sympy/issues/detail?id=1559
Some operations like gcd and factor take either Poly or sympy expressions in symbols but in both cases return expressions. >>> factor(Poly(x,x)) x >>> factor(x+x**2,x) x*(1 + x) It might be better to return the same type of object as was received. This is especially important if a list of polynomials is to be reduced to the gcd or lcm. Right now you would have to convert the results at each step back into a Poly, something like reduce(lambda a,b:Poly(lcm(a,b),x) ,[Poly(tmp,x) for tmp in [x,2*x,5*x]]) instead of reduce(lcm ,[Poly(tmp,x) for tmp in [x,2*x,5*x]]) /c -- 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 sympy-issues@googlegroups.com To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---