smpl.wrap.get_lambda
- smpl.wrap.get_lambda(expr, xvar)[source]
 Returns a lambda of given
str/function/lambdaexpression with__doc__set to the latex expression.xvaris moved to the front.Examples
>>> l = get_lambda(lambda a,b,c,x : (a+b+c)*x,'x') >>> l(4,1,1,1) 12 >>> l = get_lambda("(a+b+c)*x",'x') >>> l(4,1,1,1) 12 >>> def fun(a,b,x,c): ... return (a+b+c)*x >>> l = get_lambda(fun,'x') >>> l(4,1,1,1) 12