[sympy] dict( list_of_Equalities ) should work?

2012-05-30 Thread krastanov.ste...@gmail.com
Do you agree? It would be useful for: In [10]: x.subs(Eq(x,1)) --- ValueError: When a single argument is passed to subs it should be an iterable of (old, new) tuples. In [11]: x.subs([Eq(x,1)]) ---

Re: [sympy] dict( list_of_Equalities ) should work?

2012-05-30 Thread Chris Smith
On Wed, May 30, 2012 at 10:21 PM, krastanov.ste...@gmail.com wrote: > Do you agree? It would be useful for: > > In [10]: x.subs(Eq(x,1)) > --- Although we honor "left" and "right", there is nothing strict about the ordering o

Re: [sympy] dict( list_of_Equalities ) should work?

2012-05-30 Thread krastanov.ste...@gmail.com
That is true... I am just very confused by all the different ways that the solvers return their solutions. Is there any convention about that? When it is a list, a dict, an Eq... -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, se

Re: [sympy] dict( list_of_Equalities ) should work?

2012-05-30 Thread Chris Smith
On Wed, May 30, 2012 at 10:39 PM, krastanov.ste...@gmail.com wrote: > That is true... I am just very confused by all the different ways that > the solvers return their solutions. Is there any convention about > that? When it is a list, a dict, an Eq... When we last tried we didn't come to a good

Re: [sympy] dict( list_of_Equalities ) should work?

2012-05-30 Thread krastanov.ste...@gmail.com
On 30 May 2012 18:57, Chris Smith wrote: > On Wed, May 30, 2012 at 10:39 PM, krastanov.ste...@gmail.com > wrote: >> That is true... I am just very confused by all the different ways that >> the solvers return their solutions. Is there any convention about >> that? When it is a list, a dict, an Eq

Re: [sympy] dict( list_of_Equalities ) should work?

2012-06-01 Thread Aaron Meurer
I thought this too, but the consensus was to make it not do it. For example, what would (x + y).subs(Eq(x, y)) return? See http://code.google.com/p/sympy/issues/detail?id=2677. Aaron Meurer On Wed, May 30, 2012 at 10:36 AM, krastanov.ste...@gmail.com wrote: > Do you agree? It would be useful fo

Re: [sympy] dict( list_of_Equalities ) should work?

2012-06-01 Thread krastanov.ste...@gmail.com
What about making Eq iterable? It will permit the use of zip on a list of Eq. On 1 June 2012 20:48, Aaron Meurer wrote: > I thought this too, but the consensus was to make it not do it.  For > example, what would (x + y).subs(Eq(x, y)) return? See > http://code.google.com/p/sympy/issues/detail?id

Re: [sympy] dict( list_of_Equalities ) should work?

2012-06-01 Thread krastanov.ste...@gmail.com
Never mind, you agreed not to do it on the issue page. -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For m

Re: [sympy] dict( list_of_Equalities ) should work?

2012-06-01 Thread Aaron Meurer
What you need to consider is if Eq is really an iterable container or not. You can always convert it to one--or indeed, any Basic object into one--using .args. It's also straight forward enough to combine this with list comprehensions for functions like zip(). Personally, I don't think it is, but