Would multiple dispatch be best for implementing Add/Mul/Etc for these
different types?


Jason
moorepants.info
+01 530-601-9791

On Thu, Mar 23, 2017 at 10:45 AM, Aaron Meurer <asmeu...@gmail.com> wrote:

> An expression like x*A + B would be problematic, but 2*A + B should
> actually be fine, because the flatten algorithm splits off numeric
> coefficients (so that they can be combined).
>
> Aaron Meurer
>
> On Thu, Mar 23, 2017 at 11:59 AM, Francesco Bonazzi
> <franz.bona...@gmail.com> wrote:
> > There's another complication. Consider the expression:
> >
> > 3*A + 2*B
> >
> > Suppose A and B require a flatten-postprocessor at the Add level. The Add
> > object will not detect them, because its parameters are just two Mul
> > objects.
> >
> > --
> > 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 https://groups.google.com/group/sympy.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/sympy/e1823603-00b8-
> 4424-8ccc-52d08053f2ea%40googlegroups.com.
> >
> > 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 https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/sympy/CAKgW%3D6JXzSmPiZxCYBSnQwd7URE9_3vieRVA%2B_y2aAZV_gmcHA%
> 40mail.gmail.com.
> 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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAP7f1AjRyuxHOPMJN2ViQGjgvCpOMiiLzZZ%2BGgqeGZXKvuOUgw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to