On Oct 5, 9:46 pm, Scott <spectre...@gmail.com> wrote: > On Oct 4, 5:48 pm, Ondrej Certik <ond...@certik.cz> wrote: > > > > return Add(term for term in expr.as_Add() if term.as_coeff_terms()
Add wants items, not a generator: return Add(*[term for term in expr.as_Add() if term.as_coeff_terms()[0] >= tol]) To summarize: use Add(a,b,c) or Add(*[a,b,c]) or Add(*[x for x in iter]) but not Add(x for x in iter) -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.