<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 About
This notebook was created to follow the sympy code generation tutorial at this link
Step1:  lambdify constructs string representation of python code and uses python eval to compile
<ASSISTANT_TASK:>
Python Code:
import sympy as sym
sym.init_printing()
x, y = sym.symbols('x y')
expr = 3*x**2 + sym.log(x**2 + y**2 + 1)
expr
expr.subs({x: 17, y: 42}).evalf()
% timeit expr.subs({x: 17, y: 42}).evalf()
import math
f = lambda x, y:  3*x**2 + math.log(x**2 + y**2 + 1)
%timeit f(17, 42)
g = sym.lambdify([x, y], expr, modules=['math'])
g(17, 42)
%timeit g(17, 42)
import numpy as np
xarr = np.linspace(17,18,5)
h = sym.lambdify([x, y], expr)
out = h(xarr, 42)
out
Explanation: About
This notebook was created to follow the sympy code generation tutorial at this link
End of explanation
z = z1, z2, z3 = sym.symbols('z:3')
expr2 = x*y*(z1+z2+z3)
func2 = sym.lambdify([x, y, z], expr2)
func2(1,2, (3,4,5))
# Vector arguments can be done as tuples when using odeint... (see video/example)
# How to efficiently deal with matrices without preconverting?
# Or just save as M, C, etc... What about pars? Third argument. Can it be dict or must it be tuple?
# How to efficiently save, 
Explanation: lambdify constructs string representation of python code and uses python eval to compile
End of explanation
<END_TASK>