[sympy] Re: Possible Bug in sympify

2009-05-05 Thread Colin Gillespie
Hi, I think that the expected behaviour would be for pow(x,2) to return x^2, as opposed to a general function. Otherwise, it would be inconsistent with how 'sin' and 'exp' are handled (for example). Cheers Colin On May 1, 7:02 pm, Ondrej Certik wrote: > On Fri, May 1, 2009 at 10:45 AM, Colin

[sympy] Re: Possible Bug in sympify

2009-05-01 Thread Ondrej Certik
On Fri, May 1, 2009 at 10:45 AM, Colin Gillespie wrote: > > Hi Ondrej, > > I've tried to figure out exactly where the errors lies, but don't have > anything concrete. Here's what I have come up with: > >> >> y=Symbol("pow(A,2)") >> >> Poly(y,y) > Poly(pow(A,2), pow(A,2)) > > Seems OK. > >> >> x=s

[sympy] Re: Possible Bug in sympify

2009-05-01 Thread Colin Gillespie
Hi Ondrej, I've tried to figure out exactly where the errors lies, but don't have anything concrete. Here's what I have come up with: > >> y=Symbol("pow(A,2)") > >> Poly(y,y) Poly(pow(A,2), pow(A,2)) Seems OK. > >> x=sympify("pow1(PZPZ)") > >> help(x) Help on pow1 in module sympy.core.function

[sympy] Re: Possible Bug in sympify

2009-04-30 Thread Ondrej Certik
On Thu, Apr 30, 2009 at 3:01 AM, Colin Gillespie wrote: > > Hi, > > In the code: > x=sympify('pow(PZ,2)') x >     pow(PZ, 2) Poly(x,Symbol('PZ')) > Traceback (most recent call last): >  File "", line 1, in >  File "/data/ncsg3/pythonModules/lib/python2.5/site-packages/ > sympy-0.6