[sympy] Hwo to know if an expression is a polynom

2009-06-26 Thread Christophe
Hello, I would like to know if there is a sympy way to test is an expression is a polynom of the variable x ? Best regards. Christophe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sympy group. To post to this

[sympy] Hwo to know if an expression is a polynom

2009-06-26 Thread Mateusz Paprocki
Hi, On Fri, Jun 26, 2009 at 05:30:23PM +0200, Christophe wrote: Hello, I would like to know if there is a sympy way to test is an expression is a polynom of the variable x ? Best regards. Christophe. the simplest way to achieve this is to use Basic.is_polynomial method: In [1]:

[sympy] Hwo to know if an expression is a polynom

2009-06-26 Thread Mateusz Paprocki
Hi, On Fri, Jun 26, 2009 at 05:57:57PM +0200, Christophe wrote: Thanks for that but I have a big problem. How to use all of that for f and g which are strings ? f = 'x**2 + 2*y*x + sin(z)' g = 'x**2 + 2*y*x + sin(x)' I need to work