On Tue, Nov 25, 2008 at 9:46 PM, Scott <[EMAIL PROTECTED]> wrote: > On Nov 25, 12:27 pm, "Ondrej Certik" <[EMAIL PROTECTED]> wrote: >> Hi Scott, >> >> On Tue, Nov 25, 2008 at 4:25 PM, Scott <[EMAIL PROTECTED]> wrote: >> >> > How do you bend subs syntax to substitute and and array of symbols? >> >> > a,b,x,y=symbols('a','b','x','y') >> > q=a,b >> > p=x,y >> > f= a**2 + b >> >> > ?? f.subs({p:q})?? >> >> > x**2+y >> >> Are you talking about the current syntax, or the new syntax? > > Either syntax , I currently use version 0.6.2 but will upgrade to > 0.6.3 as soon as I find .deb file. My goal is to swap easy to type > sympols with symbol that pprint well.
Well, this works for me: In [1]: var("a b x y") Out[1]: (a, b, x, y) In [2]: f = a**2 + b In [3]: f.subs({a: x, b: y}) Out[3]: 2 y + x So if you want to use the syntax .subs({x, y: a, b}), then you can easily implement that, but I don't think it should be the default, at least I don't find it intuitive. Ondrej --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---