Arbiter
Arbiter

Reputation: 111

Dealing with tensors and symbolic language in python

I want to do manipulations with big mathematical expressions containing tensors and symbols. For example I have expressions containing the Kronecker delta $δ_{ij}$ and the 3-dimension Levi-Civitta ε_{ijk} and want to calculate tensors containing terms like:

equation 1

with the indices running from i=1,2,3.I have more complicated combinations of such terms (up to 9 or 10 indices overall), as well as sums of such terms. First, what is the correct python package to calculate the above expression? By calculate I mean that I can know what it is for each value of the indices.

Second, I also want to do symbolic calculations, by considering (constant) matrices and tensors of symbols, such as A_ij, i,j=1,2,3 and B_ijk, i,j,k=1,2,3: A's and B's are symbols.

I would then want to calculate the summations of the A's and B's with expressions in equation (1), such as: equation 2

where I am treating A's and B's as symbols.

I have considered a combination of numpy and sympy, but this is the first time using tensors, so I am not sure how to proceed. I also happened upon pytearcat, but this is more geared towards general relativity and it doesn't seem to be appropriate for tensor products. Any suggestions, or is this too much to hope to do it with python?

Upvotes: 1

Views: 36

Answers (0)

Related Questions