Status: Valid
Owner: ----
Labels: Type-Enhancement Priority-Medium
New issue 3338 by [email protected]: API for expand methods to go all the
way
http://code.google.com/p/sympy/issues/detail?id=3338
This was discussed https://github.com/sympy/sympy/pull/1431. To quote from
there:
So now I think what we should do is develop some kind of API for expand
going all the way with hints. Maybe objects could define _could_expand_hint
methods that would return True if the hint expansion could still happen.
Then expand could rerun hints until they give False. For example,
Mul._could_expand_mul would be something like return any(isinstance(i, Add)
for i in self.args).
Then there's the question of ordering of hints. Should we provide a
framework for hints to set themselves as higher priority than other hints
(e.g., multinomial should come before mul so that expand(x*(x + 1)**2)
works)? There's a question of what that API would look like and how we
would consistently break ties.
Note that currently the polys _dict_from_expr has a custom routine to do
this for mul and multinomial. Also note that the situation for mul is
actually a little more complicated due to fractions (see issue 2820).
--
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.