On Thu, Nov 10, 2011 at 8:42 PM, gsagrawal <[email protected]> wrote: > i mentioned that sorting of args will not work here. > Consider below example, > k1=Add([x+y,-z],evaluate=False) > k2=Add([x-z,y],evaluate=False) > in this case k1.args are (x+y,-z) and k2.args are (x-z,y) . > So sorting here will not improve the result. > also if i use flatten method of this class than it sums up the common > terms(against the evaluate=False) > Is there any way to bypass this issue ?
Make a custom comparison routine? def ueq(a,b): return type(a)(*a.args) == type(b)(*b.args) -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
