On Tue, Apr 15, 2008 at 09:08:47AM +0200, Friedrich Hagedorn wrote:
> In [27]: f=Lambda(x, exp(x*x)*log(x*x)-x)
> In [29]: f(2.0)
> Out[29]: -2 + exp(4)*log(4)
> 
> I think this is not the expected behavior, but you can do
> 
> In [30]: f(2.0).evalf()
> Out[30]: 73.68910751852562519599736335
> 
> The advantage from the Lambda() methode is that you can use your
> sympy expressions directly. But it is very slow compared to the python 
> lambda.

Ok. One more way is

In [5]: F=lambdify(exp(x*x)*log(x*x)-x, [x])
In [10]: F(2)
Out[10]: 73.6891075185

And this ist fast, but dont work with numpy arrays. This topic was 
discussed in 

http://groups.google.com/group/sympy/browse_thread/thread/41d4a85323d09fa1#



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to