On Thu, Nov 19, 2009 at 7:45 PM, Alex Raichev <tortoise.s...@gmail.com> wrote:
> Thanks for the workaround, William.  I was thinking the same thing as
> a temporary fix but am having difficulties with that approach.
>
> Here's my situation.  I have a big symbolic expression E involving
> lots of derivatives.  I want to substitute the derivatives with other
> symbolic expressions, and the substitutions are stored in a big
> dictionary D.  Presently E.subs(D) does not work in Sage.
>
> I tried a keyword substitution instead, but got the error
> 'SyntaxError: keyword can't be an expression (<ipython console>, line
> 1)'
>
> Another approach is to convert E and the keys of D to strings, perform
> the substitution as strings, and then convert E back to a symbolic
> expression.  I'm trying this now but am getting stuck with the string
> substitution step...
>
> If anyone out there can think of a simpler temporary workaround,
> please let me know.

If you're using strings, you might find this useful:

   sage: sage.misc.multireplace.multiple_replace?


William

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to