Well, I wouldn't consider that to be hacky. That's what I was going to suggest. It's just a simple call to subs to replace it.
If you want something more magical, I guess you could create your own custom subclass of Symbol that does whatever you want in its _eval_derivative method. Aaron Meurer On Sun, Apr 15, 2012 at 6:46 PM, Andreas Kloeckner <[email protected]> wrote: > Hi all, > > When differentiating, can I have sympy call me back to ask about each > partial derivative? Suppose I'm differentiating by t, and sympy > encounters an x, can I get a callback asking for \partial x/partial t? > > A hacky way would be to express all dependencies explicitly as function > symbols 'x(t)', and then re-traverse the result and substitute away the > resulting partial derivatives... but I figure there must be a better > way? > > Thanks, > Andreas > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. 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.
