Comment #6 on issue 3710 by [email protected]: shallow expansion feature/bug
http://code.google.com/p/sympy/issues/detail?id=3710
There is only function 'use' in the simplify.simplify.traversaltools.py
file. And this is how it can be used to give the shallow processing of an
expression:
e
x*(x + y*(z + 1)) + x*(x*(a - b)*(y + z) + x + 1) + 2
use(e, lambda x: expand_mul(x, deep=False), e.is_Add)
a*x**2*y + a*x**2*z - b*x**2*y - b*x**2*z + 2*x**2 + x*y*z + x*y + x + 2
e=e/z
use(e, lambda x: expand_mul(x, deep=False), e.is_Add)
a*x**2*y/z + a*x**2 - b*x**2*y/z - b*x**2 + 2*x**2/z + x*y + x*y/z + x/z +
2/z
So should we have a function like this along with the other expand_*
functions?
flatten_expr = lambda e: use(e, lambda x: expand_mul(x, deep=False),
e.is_Add)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.