Great. If you could make a pull request with this change, that would be great. This is a change that would obviously benefit everyone.
Aaron Meurer On Tue, Feb 26, 2013 at 7:23 PM, G B <g.c.b.at.w...@gmail.com> wrote: > Thanks, Aaron. I put the following into LambdaPrinter, and it seems to be > doing the job nicely: > > def _print_Mod(self,expr): > a=expr.args > retVal= "((%s)%%(%s))" % (self._print(a[0]),self._print(a[1])) > return retVal > > > On Monday, February 25, 2013 10:04:08 AM 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 <g.c.b....@gmail.com> 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 sympy+un...@googlegroups.com. >> To post to this group, send email to sy...@googlegroups.com. >> >> 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 sympy+unsubscr...@googlegroups.com. > To post to this group, send email to sympy@googlegroups.com. > 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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.