Re: [sympy] Re: Gradient of a vector

2020-04-29 Thread Alexander Lindsay
grad(vec) should return a matrix (like the Jacobian https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant) On Mon, Apr 27, 2020 at 4:45 PM Aaron Meurer wrote: > SymPy does support taking derivatives with respect to matrices, via > diff(). Is this what you are looking for? > > Aaron

Re: [sympy] Re: Gradient of a vector

2020-04-27 Thread Aaron Meurer
SymPy does support taking derivatives with respect to matrices, via diff(). Is this what you are looking for? Aaron Meurer On Mon, Apr 27, 2020 at 2:09 PM Alexander Lindsay wrote: > > On Sat, Apr 25, 2020 at 6:39 AM S.Y. Lee wrote: >> >> SymPy defines gradient only for scalar valued function.

Re: [sympy] Re: Gradient of a vector

2020-04-27 Thread Alexander Lindsay
On Sat, Apr 25, 2020 at 6:39 AM S.Y. Lee wrote: > SymPy defines gradient only for scalar valued function. > Do you mean that gradient of vector valued function should return other > stuff like jacobian? > I would like the gradient of a vector valued function to return the Jacobian yes, or the

[sympy] Re: Gradient of a vector

2020-04-25 Thread Nicolas Guarin
You could check a module that I wrote in Continuum Mechanics https://continuum-mechanics.readthedocs.io/en/latest/ It already has the gradient of a vector for orthogonal coordinates. On Friday, April 24, 2020 at 1:44:15 PM UTC-5, Alexander Lindsay wrote: > > I've been using the capabilities in

[sympy] Re: Gradient of a vector

2020-04-25 Thread S.Y. Lee
SymPy defines gradient only for scalar valued function. Do you mean that gradient of vector valued function should return other stuff like jacobian? On Saturday, April 25, 2020 at 3:44:15 AM UTC+9, Alexander Lindsay wrote: > > I've been using the capabilities in sympy.vector for generating MMS