Open rjrosati opened 4 years ago
This is a syntax issue, this seems to work just fine:
replace_with_arrays(A(i)*A(j)*field.metric(-i,-j), Dict(A(-i) => [0, 1], field => [1 0; 0 1]) )
Still, should we modify replace_with_arrays
to be more friendly at all?
replace_with_arrays
has sufficient information to work in cases like:This function should internally know that
field.metric(-i,-j)
is justinv([1 0; 0 1])
, and thatA(i)
is justA(-j)*field.metric(i,j) == [0,1]' * [1 0; 0 1]
, but it gives an unspecified metric error.This error is upstream and also exists in
sympy.tensor.tensor
. Should we rewritereplace_with_arrays
?