I've had similar problems using lambdify with symbols with funny characters or unfriendly formatting. My solution was to substitute in Dummy symbols for everything I knew would be problematic, which solved my problem. Is there a case when that behavior could be bad, or would implementing this make lambdify better? It doesn't really address the eval issue, just the current implementation.
-Gilbert On Monday, 25 February 2013 10:04:08 UTC-8, Aaron Meurer wrote: > > Wouldn't it be better to make it print using %. That would be universal, > not just for Numpy (and it should therefore just be added to the > LambdaPrinter). > > Aaron Meurer > > On Feb 25, 2013, at 1:53 AM, G B <[email protected] <javascript:>> > wrote: > > I went and tried to lamdify an expression with a Mod operator using the > "numpy" module, and it didn't like it. Is fixing this as easy as adding > "Mod":"mod", > to the NUMPY_TRANSLATIONS dictionary in utilities/lambdify.py? > > I just discovered lambdify, and now I can't stop using it for > everything... I'd had my own implementation using a hacked together > sequence of substitutions, solves and closures, but this is much more > satisfying! > > Thanks-- > Greg > > -- > 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] <javascript:>. > To post to this group, send email to [email protected] <javascript:>. > Visit this group at http://groups.google.com/group/sympy?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
