import sympy
from sympy import symbols
from einsteinpy.symbolic import BaseRelativityTensor
sympy.init_printing()
syms = symbols("x y")
x, y = syms
T = BaseRelativityTensor([[x, 1],[0, x+y]], syms, config="ll")
args, func = T.tensor_lambdify()
args
args
indicates the order in which arguments should be passed to the returned function func
func(2, 1)