[sympy] Re: symbolic matrix differentiaton

2011-06-29 Thread SherjilOzair
Hello Amit, The line of code you have given is not clear. Could you give a more concrete example of a functionality that you're expecting ? If you want to calculate the hessian of a function, Sympy has a hessian function which takes in a function and a list of variables of the function, and return

[sympy] Re: symbolic matrix differentiaton

2011-06-30 Thread Amit
Hello Sherjil, Sorry for the misunderstanding, it isn't a line of code but latex math expression (or at least supposed to be :-)) An example (in latex syntax) would be: \partial(X^{-1}) = - X^{-1}(\partial X ) X^{-1} Thanks, Amit On Jun 30, 9:21 am, SherjilOzair wrote: > Hello Amit, > The line

[sympy] Re: symbolic matrix differentiaton

2011-06-30 Thread Amit
Hello Aaron, Thanks for pointing out this thread (I did search the group but missed it): http://groups.google.com/group/sympy/browse_thread/thread/7a4ab2af17b3c10d/90ba1a6bebb59eb9 I am talking about a similar idea but I am looking also for calculus operations like differentiation. Thanks, Amit

Re: [sympy] Re: symbolic matrix differentiaton

2011-06-29 Thread Aaron Meurer
I think he wants to do things with symbolic matrices, like what Matthew proposed in another thread. Differentiating matrices symbolically is indeed tricky because you have to be careful about commutativity. Aaron Meurer On Thu, Jun 30, 2011 at 12:21 AM, SherjilOzair wrote: > Hello Amit, > The l

Re: [sympy] Re: symbolic matrix differentiaton

2011-06-30 Thread Aaron Meurer
By the way, if you don't actually need any specific attributes of matrices other than non-commutativity (and you're assuming everything is square n x n), you can already do this in SymPy: In [10]: a, b = symbols('a b', commutative=False) In [15]: diff(f(a)*g(a), a) Out[15]: d d f(a)