[sympy] Re: refactoring Mul and Add classes

2009-07-10 Thread Ondrej Certik
On Sat, Jul 11, 2009 at 12:47 AM, Ondrej Certik wrote: > On Fri, Jul 10, 2009 at 11:03 PM, Aaron S. Meurer wrote: >> >> Also, if anyone wants to give it a shot implementing it, that would be >> awesome too. > > Here is some code I just wrote: > > git pull git://github.com/certik/sympyx.git This s

[sympy] Re: refactoring Mul and Add classes

2009-07-10 Thread Ondrej Certik
On Sat, Jul 11, 2009 at 12:47 AM, Ondrej Certik wrote: > On Fri, Jul 10, 2009 at 11:03 PM, Aaron S. Meurer wrote: >> >> Also, if anyone wants to give it a shot implementing it, that would be >> awesome too. > > Here is some code I just wrote: > > git pull git://github.com/certik/sympyx.git > cd sy

[sympy] Re: refactoring Mul and Add classes

2009-07-10 Thread Ondrej Certik
On Fri, Jul 10, 2009 at 11:03 PM, Aaron S. Meurer wrote: > > Also, if anyone wants to give it a shot implementing it, that would be > awesome too. Here is some code I just wrote: git pull git://github.com/certik/sympyx.git cd sympyx git checkout -b handler origin/handler python a.py and study

[sympy] Re: refactoring Mul and Add classes

2009-07-10 Thread Aaron S. Meurer
Also, if anyone wants to give it a shot implementing it, that would be awesome too. Aaron Meurer On Jul 10, 2009, at 11:00 PM, Ondrej Certik wrote: > > Hi, > > Aaron is now with me in Los Alamos and we are trying to figure out how > to nicely incorporate the Constant class inside SymPy, it's c

[sympy] refactoring Mul and Add classes

2009-07-10 Thread Ondrej Certik
Hi, Aaron is now with me in Los Alamos and we are trying to figure out how to nicely incorporate the Constant class inside SymPy, it's currently in this branch: http://github.com/asmeurer/sympy/tree/constant-Mul and it works, however, as you can see, it need modifications in the Add and Mul cla

[sympy] Re: Method of characteristics for simple first-order PDEs

2009-07-10 Thread Aaron S . Meurer
I am working on and arbitrary constant type that would automatically combine with other constants (such as 2*C1 => C1). Whenever I get that in, we could see if it could be modified to do arbitrary functions. For now, I would just do F1, F2 = map(Function, 'F1 F2') as you said, just like

[sympy] Re: Bug or feature in Basic.subs()

2009-07-10 Thread Ondrej Certik
On Fri, Jul 10, 2009 at 3:52 AM, Priit Laes wrote: > > Hey! > > Can someone confirm, that code below is valid and I am not abusing > anything? :) > > #!/usr/bin/python > from sympy import * > F = Function('F') > x, y, t = symbols('x y t') > a = Symbol('a', Real=True) > eq = Derivative(F(x, t), x)

[sympy] Questions about infinities and about testing is something is a real number

2009-07-10 Thread Christophe
Hello, I've two questions : 1. Is there a way to test is an expression is real ? By expression, I mean any kind of sympy command. 2. Why don't you use +oo rather than oo for the positive infinity. You should keep oo for complex infinity which is isusefull for holomor

[sympy] Re: Bug or feature in Basic.subs()

2009-07-10 Thread David Joyner
On Fri, Jul 10, 2009 at 5:52 AM, Priit Laes wrote: > > Hey! > > Can someone confirm, that code below is valid and I am not abusing > anything? :) > > #!/usr/bin/python > from sympy import * > F = Function('F') > x, y, t = symbols('x y t') > a = Symbol('a', Real=True) > eq = Derivative(F(x, t), x)

[sympy] Bug or feature in Basic.subs()

2009-07-10 Thread Priit Laes
Hey! Can someone confirm, that code below is valid and I am not abusing anything? :) #!/usr/bin/python from sympy import * F = Function('F') x, y, t = symbols('x y t') a = Symbol('a', Real=True) eq = Derivative(F(x, t), x) pat = -33*t*x + F(x + exp(-t)) sub = eq.subs(F(x, t), pat) print "Fails a