- #1
ergospherical
- 1,072
- 1,365
Computer says "TypeError: Data type not understood; expecting list of lists or lists of values."
Python:
import sympy as sp
t,r,a,b = sp.symbols('t r a b')
g00 = -(1-(1/r))
g01 = 0
g02 = 0
g03 = 0
g10 = 0
g11 = 1/(1-(1/r))
g12 = 0
g13 = 0
g20 = 0
g21 = 0
g22 = r**2
g23 = 0
g30 = 0
g31 = 0
g32 = 0
g33 = (r**2)*((sp.sin(a))**2)
g = sp.Matrix([g00,g01,g02,g03],[g10,g11,g12,g13],[g20,g21,g22,g23],[g30,g31,g32,g33])
print(g)