[sympy] Newbie: display product

2019-07-08 Thread Gary Pajer
I'm sure I'm not the first person having trouble getting started. If there is a good tutorial, more detailed than the sympy docs tutorial, please point me to it! I want to display the product of two expressions. Suppose I have a, b, x, y = symbols('a b x y') ex1 = Eq(a, x + y) ex2 = Eq(b, x

[sympy] Newbie: display product

2019-07-08 Thread Gagandeep Singh (B17CS021)
So you want to multiply the two equations? -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to

[sympy] Re: Piecewise recursively evaluates itself

2019-07-08 Thread Gagandeep Singh (B17CS021)
So, basically you want `doit` not to evaluate certain expressions while traversing the recursion. Isn't it? May be that isn't possible currently, because for that, `evaluate` should be made a state of sympy object so that, doit() can detect to leave it unevaluated but that would impact the

[sympy] Re: Piecewise recursively evaluates itself

2019-07-08 Thread Chris Smith
I opened issue #17165 On Monday, July 8, 2019 at 9:48:57 AM UTC-5, Tomasz Pytel wrote: > > At this point let me confess my ignorance of the internal mechanics of > SymPy, I am very new to it and so am not sure what path the evaluation of a > Piecewise follows. My assumption was that there is at

[sympy] Piecewise recursively evaluates itself

2019-07-08 Thread Tomasz Pytel
Certain Piecewise expressions will recursively evaluate themselves ad infinitium for every call to .doit (), instead of recognizing the recursion. For example: Sum (x**n, (n, -1, oo)).doit () = Piecewise((1/(x*(1 - x)), Abs(x) < 1), (Sum(x**n, (n, -1, oo)), True)) Piecewise((1/(x*(1 - x)),

[sympy] Piecewise recursively evaluates itself

2019-07-08 Thread Gagandeep Singh (B17CS021)
I personally believe that all doits should be called with one outer doit. May be this can be efficiently implemented with a stack. Let's see what others have to say. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and

[sympy] Re: Piecewise recursively evaluates itself

2019-07-08 Thread Tomasz Pytel
In this case that would not be necessary as a recursive evaluation is literally a copy of the original expression and so could be checked for upon execution of the doit at which point the original expression should be returned. On Monday, July 8, 2019 at 11:03:15 AM UTC-3, Gagandeep Singh

[sympy] Re: Piecewise recursively evaluates itself

2019-07-08 Thread Tomasz Pytel
At this point let me confess my ignorance of the internal mechanics of SymPy, I am very new to it and so am not sure what path the evaluation of a Piecewise follows. My assumption was that there is at some point a member function of Piecewise which gets control to recursively evaluate its