Comment #15 on issue 973 by [email protected]: expansion speedup:
http://code.google.com/p/sympy/issues/detail?id=973

The multinomial expansion which takes 20 seconds takes about half that time by using multinomial_coefficients_iterator to build up the result:

jnk=((a+b+c+d+e+i)**15).expand()

from sympy.ntheory.multinomial import *
bases
(a, b, c, d, e, i)
expa=Add(*[t*Mul(*[ba**ee for ba, ee in zip(bases, m)]) for m,t in
... multinomial_coefficients_iterator(6,15)])
jnk==expa
True


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en.

Reply via email to