Just a heads up, you'll need to define the free_symbols in your custom subclass to include whatever you're taking the derivative of, because diff() short-circuits on expressions that don't contain the differentiation variable in the free_symbols. Hopefully that won't be too much of a burden on this idea.
Aaron Meurer On Sun, Apr 15, 2012 at 7:22 PM, Andreas Kloeckner <[email protected]> wrote: > On Sun, 15 Apr 2012 18:54:40 -0600, Aaron Meurer <[email protected]> wrote: >> 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. > > Your second suggestion should do what I want. 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.
