Hi, On Sun, Sep 1, 2013 at 12:38 PM, Gilbert Gede <[email protected]> wrote: > Check out this PR for a discussion of appropriateness of dummification: > https://github.com/sympy/sympy/pull/1920 > > Here's the new PR with the correction: > https://github.com/sympy/sympy/pull/2428
If I understand correctly, you are trying to guess whether the person calling lambdify wants numerical implementations or not. I agree with your comment on the PR: "But I see your point about symbols/expressions vs. sub_/big_expressions. But I would think with lambdify, as it is intended for preparing for numerical evaluation, that this wouldn't be a concern." : https://github.com/sympy/sympy/pull/1920 At the moment you try to guess based on whether someone explicitly passed 'sympy' as the modules argument, or the first argument to modules (it's not the default). For example, it might be the case that someone passed 'sympy' as the first argument, but 'numpy' as the second, and all the functions in the expression are numpy functions. Or the user might pass 'sympy' as the modules, and have an implemented function in the expression, so clearly does want numerical implementation. So it seems to me the problem here is that you are having to use an implicit heuristic to determine what the function does, and it would be hard to guess how to change the behavior of the function without reading to the code to work out the heuristic. I think Jason is right - 'dummify' should be an argument to lambdify; if you really want the heuristic, it should be in the case where 'dummify' is None. Cheers, Matthew -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
