(Some function) is not defined with SymPy Lambdify
问题 So I'm writing a script that evaluates Taylor Series. However, I want it to evaluate for all types of functions. So I tried, for example, using the function acot(x) . x = sy.Symbol('x') f = acot(x) ... func = taylor(f,0,3) taylor_lambda = sy.lambdify(x, func, 'numpy') The above runs without an exception (except if I use acsch , for example, and it does not run). But then when it reaches this line: plt.plot(x1,taylor_lambda(x1),label='taylor approximation') I get: NameError: name 'acot' is not