I tried out this to get the expression

>>> from sympy import symbols
>>> from sympy.utilities.autowrap import ufuncify
>>> x=symbols('x')
>>> expr=x**2 +x**4 +1
>>> binary_fu=ufuncify(x, expr)
>>> binary_fu(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: ufunc 'wrapper_module_0' not supported for the input types, and 
the inputs could not be safely coerced to any supported types according to 
the casting rule ''safe''

This is expected because a ufunc will expect an array. Is there a way to 
get the expression once one has ufuncified it? 
(This is trivial in case of lambify)
>>> lambdified_poly=lambdify(x,expr)
>>> lambdified_poly(x)
x**4 + x**2 + 1
 
Please help me.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/9b653989-d049-442a-9e2d-78abd92a8ab0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to