[sympy] Issue 3479 "KroneckerDelta should canonicalize"

2013-03-03 Thread Bi Ge
Hi Sympy community, I've been looking at issue3479 and trying to fix it by using minlex. Right now I just put the following at the end of def eval(cls, i, j): sort_args = minlex( ( i , j ) ) i = sort_args[0] j = sor

[sympy] Sympy GA module

2013-03-03 Thread tsc
I've just found the sympy GA module, and I must say it looks really neat! I'd like to use it for automatic differentiation and equation solving in high-dimensional conformal geometric algebra. While experimenting with the module, I've run into a few problems though. I'm not familiar with sympy

[sympy] Re: [IPython-User] switching between display representations in the frontend

2013-03-03 Thread Thomas Hisch
Hi, On Sun, Mar 3, 2013 at 12:11 PM, Matthias BUSSONNIER wrote: > Hi, > Le 3 mars 2013 à 08:41, Thomas Hisch a écrit : > >> Hello, >> >> the sympy printing extension configures formatters for rendering latex >> expressions: image/png and text/latex. According to [0] all >> representations of an o

Re: [sympy] Sympy GA module

2013-03-03 Thread Alan Bromborsky
On 03/03/2013 08:07 AM, tsc wrote: I've just found the sympy GA module, and I must say it looks really neat! I'd like to use it for automatic differentiation and equation solving in high-dimensional conformal geometric algebra. While experimenting with the module, I've run into a few problems t

Re: [sympy] Recurrent relationships

2013-03-03 Thread Stefan Krastanov
I guess it is too complicated for sympy (namely, b has two indices and the equations are not linear), but check out `rsolve`. On 3 March 2013 02:54, wrote: > Hi, > I have a system of recurrent relationships, like the following (simplified > example): > > a = Function('a') > b = Function('b') > k

Re: [sympy] Travis timeouts

2013-03-03 Thread Ondřej Čertík
On Sat, Mar 2, 2013 at 1:14 AM, Aaron Meurer wrote: > Does anyone have any ideas why the Travis tests recently are all > failing in Python 2.5 with "I'm sorry but your test run exceeded 50.0 > minutes."? See for example > https://travis-ci.org/sympy/sympy/jobs/5110469. It looks like it gets > to

Re: [sympy] Issue 3479 "KroneckerDelta should canonicalize"

2013-03-03 Thread Stefan Krastanov
I do not think that the problem here is with your understanding of sympy but rather with the way that pythonic variables work. for instance: L = [1,2] a = L[0] # 'a' points to the object int(1) a = 5 # 'L' does not change but 'a' points to the object int(5) I used the verb "points" but it wo

Re: [sympy] Re: Travis-CI is not keeping up with sympy

2013-03-03 Thread Ondřej Čertík
Hi, I never heard back from the Travis support guys, but it looks like Travis has caught up, so all is good now. Implementing any of the things below would however help anyway. Ondrej On Sat, Feb 23, 2013 at 6:21 PM, Ondřej Čertík wrote: > Hi, > > Thanks everybody for a feedback. I think a few

[sympy] Re: [IPython-User] switching between display representations in the frontend

2013-03-03 Thread Thomas Hisch
On Sun, Mar 3, 2013 at 2:46 PM, Matthias BUSSONNIER wrote: > > Le 3 mars 2013 à 14:26, Thomas Hisch a écrit : > >> Hi, >> >> On Sun, Mar 3, 2013 at 12:11 PM, Matthias BUSSONNIER >> wrote: >>> Hi, >>> Le 3 mars 2013 à 08:41, Thomas Hisch a écrit : >>> Hello, the sympy printing exten

Re: [sympy] Issue 3479 "KroneckerDelta should canonicalize"

2013-03-03 Thread Bi Ge
OK after some reading let's see if my understanding is correct. Python variables are actually "identifiers" that sort of point to objects. In my example, i and j bind with the 2 inputs (symbol or integer) of KroneckerDelta. Even though I reassign i and j to different values, the actual inputs st

Re: [sympy] Possible improvement in representation of rationals.

2013-03-03 Thread Aaron Meurer
You could try implementing something like this, but I very much suspect it will be slower this way. For one thing, the space complexity will be increased by a lot, which is quite significant when you consider how many rationals might exist at one time. Second, factoring an integer is slow, even for

[sympy] Partial factorization

2013-03-03 Thread Aaron Meurer
This comes from http://stackoverflow.com/q/15180488/161801. Does anyone know of any functions in SymPy that could convert expression = ( x * (1 - x) * y * (1 - x - y) * z + x * (1 - x) * z * (1 - x - z) * y + y * (1 - y) * x * (1 - y - x) * z + y * (1 - y) * z * (1 - y - z) * x +

Re: [sympy] Partial factorization

2013-03-03 Thread Chris Smith
The only tricky factoring that I know of is horner. That can be used as follows to obtain a shorter expression in terms of op counts and physical length: >>> eq x*y*z*(-x + 1)*(-x - y + 1) + x*y*z*(-x + 1)*(-x - z + 1) + x*y*z*(-y + 1)*(-x - y + 1) + x*y*z*(-y + 1)*(-y - z + 1) + x*y*z*(-z + 1)*(

Re: [sympy] Partial factorization

2013-03-03 Thread Chris Smith
I posted the following on the SO page def iflfactor(eq): """Return the "I'm feeling lucky" factored form of eq.""" e = Mul(*[horner(e) if e.is_Add else e for e in Mul.make_args(factor_terms(expand(eq)))]) r, e = cse(e) s = [ri[0] for ri in r] e = Mul(*[collect(ei.expand