Another way to handle this is to sublcass the CCodePrinter and then define methods for the specific function names. You will have more control over the details if you do it that way.
Jason moorepants.info +01 530-601-9791 On Thu, Feb 26, 2015 at 10:15 AM, Jason Moore <moorepa...@gmail.com> wrote: > I'm on 0.7.6, so maybe a bug was fixed. > > > Jason > moorepants.info > +01 530-601-9791 > > On Thu, Feb 26, 2015 at 10:04 AM, John Peterson <jwpeter...@gmail.com> > wrote: > >> >> >> On Thursday, February 26, 2015 at 10:54:27 AM UTC-7, Jason Moore wrote: >>> >>> Also this one isn't obvious: >>> >>> In [21]: print sympy.ccode(sympy.symbols('x')**2, >>> user_functions={"Pow": "std::pow"}) >>> std::pow(x, 2) >>> >> >> Interestingly, this line of code still prints pow(x,2) for me. May be a >> different in Sympy version? I am using 0.7.5. >> >> -- >> 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. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sympy/fa8762b6-04b1-4c9d-92fc-0a99b7935711%40googlegroups.com >> <https://groups.google.com/d/msgid/sympy/fa8762b6-04b1-4c9d-92fc-0a99b7935711%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAP7f1Ag-SWQHPGZv2bZ6B-9izSntKCv4vyKiAxLsY5taGThPWw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.