I have a rather large symbolic function that is evaluated for different values of a parameter in a loop. In each iteration, after finding the expression of the function, par
You want lambdify.
f = lambdify(((x, y, z),), lagrange_eqs(a))
will give you a Python function f that you can evaluate like f((1, 2, 3)) (for x=1, y=2, z=3). I have made the arguments in a tuple so that it will work with scipy's fsolve.
You can set the modules flag to lambdify to determine where the exp function will come from. For instance, to use numpy, use lambdify((x, y, z), lagrange_eqs(a), modules="numpy"). To use the standard library math library, use modules="math". By default, numpy is used if it is installed, otherwise math is used.