Unfortunately SymPy doesn't have any sort of NDArray object so the short
answer is "no".

We do however offer some compatibility with numpy. You can put SymPy
objects inside of numpy arrays. This would allow you to use slicing/summing
and such.

This is a topic of interest to us though. I hope that your question will
have a better answer in a year or two.

I should note that there are a few distinct solutions to this issue within
SymPy. Given your application I don't think that these are appropriate.
It's entirely possible that I'm incorrect. You could look at

sympy/tensor/indexed.py
sympy/physics/quantum/tensorproduct.py
sympy/diffgeom (in the git repository)


On Thu, Aug 16, 2012 at 7:53 AM, Bernardo Rocha <
[email protected]> wrote:

> Hi everyone,
>
> I'm working on a simple code to calculate some tensors I need to use in
> continuum mechanics.
> In one part of my code I need to compute the derivatives of a function
> with respect to a second order tensor, which gives me a 2nd order tensor
> (let's say S).
> Then I need the derivatives of S with respect to a 2nd order tensor, which
> gives me a 4th order tensor.
> I wrote a code using the diff() function and nested lists to represent the
> 2nd and 4th order tensors.
>
> I found that there is a Matrix class in sympy and I decided to use it for
> my 2nd order tensors since I can do some nice operations with the Matrix.
> Here comes my question: is there something to handle a 4th order tensor,
> better than a pure python nested list?
>
> That's it.
> Thanks.
> Best regards,
> Bernardo M. Rocha
>
> --
> 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.
>

-- 
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.

Reply via email to