You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a tensor product of two vectors does not behave in the same way as a tensor defined with the same indices. I would expect the two lines printed by this snippet to be the same, but there is a sign difference.
from sympy.tensor.tensor import TensorIndexType, tensorhead, tensor_indices
a tensor product of two vectors does not behave in the same way as a tensor defined with the same indices. I would expect the two lines printed by this snippet to be the same, but there is a sign difference.
from sympy.tensor.tensor import TensorIndexType, tensorhead, tensor_indices
undotted = TensorIndexType('undotted', dummy_fmt='a',metric=True)
undotted.data=[[0,1],[-1,0]]
dotted = TensorIndexType('dotted', dummy_fmt='ad',metric=True)
dotted.data=[[0,1],[-1,0]]
a0 = tensor_indices('a0', undotted)
ad0 = tensor_indices('ad0', dotted)
S = tensorhead('S', [dotted, undotted], [[1],[1]])
l= tensorhead('l', [ undotted],[[1]],comm=2)
lt= tensorhead('lt', [ dotted],[[1]],comm=2)
l(a0).data=[1,10]
lt(ad0).data=[2,3]
ltl=lt(ad0)*l(a0)
S(ad0,a0).data = ltl(ad0,a0).data
S(ad0,a0).data
print S(-ad0,-a0).data
print ltl(-ad0,-a0).data
The text was updated successfully, but these errors were encountered: