On Jun 30, 2012, at 8:38 PM, "[email protected]" <[email protected]> wrote:
> Two reasons basically: > > - the original lambdify has a very convoluted logic and seems hard to > maintain (the new one is not that great either, however it does not > break as easily) (in the commit history one can see how stuff > completely unrelated to the functionality of lambdify was bolted on > it) > > - there were serious differences between what the docstring says and > what lambdify does in many corner cases > > I have discussed a lot why I dislike the original lambdify back in > November when I was writing the plotting module. I can bring these > discussions back if there is interest. I have also documented this in > details at the beginning of the source file for the new lambdify. It > would be nice to merge them together, but there is too much cruft in > the old lambdify so this will be difficult (even useless, I would > prefer simply removing both lambdify functions and relying on good > code in sympy for performance, not on some strange combination of > libraries and eval(str) operations) +1 to this. Each function should know how to numerically evaluate itself using numpy or stdlib math (or whatever), and you should be able to just do it directly, like expr.evalf(library=numpy) or something like that. I don't see any reason why that wouldn't work. eval'ing strings feels like a hack, but actually imo anything that works by rebuilding the expression tree in some what or another is inefficient because we already have the expression tree. By the way, I myself am still a little confused about how experimental_lambdify works, and how it differs from lambdify. Can you give a simple example and show how it would work in each case? Aaron Meurer -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. 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.
