Hello again,

I have one more task for subs. Supose one have a term and a function
like this:

In [1]: fxy = f(x) + f(y)

In [2]: g = Lambda(x, x + x**2)

And now I want to do easily

In [4]: fxy.subs(f, g)
Out[4]: f(x) + f(y)

But I must do the cumbersone way

In [3]: fxy.subs(f(x), g(x)).subs(f(y), g(y))
Out[3]: 
         2    2
x + y + x  + y

Any advice?

By,

  Friedrich



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to