Comment #3 on issue 3602 by [email protected]: AssertionError while
factoring noncommutative symbols.
http://code.google.com/p/sympy/issues/detail?id=3602
1) If factor() can't factor an expression, it should just return it
unchanged, not throw AssertionError.
2) This particular factorization should be doable without having to call
expand(), especially since it works with a symbol as base:
In [5]: factor(x**k + x**(k+1))
Out[5]:
k
x *(1 + x)
I especially want to avoid expand() because it is not always possible to
undo the expansion using factor(), for example:
In [6]: (x*y)**(k + 1)
Out[6]:
k + 1
(x*y)
In [7]: expand((x*y)**(k + 1))
Out[7]:
k
x*y*(x*y)
In [8]: factor(expand((x*y)**(k + 1)))
Out[8]:
k
x*y*(x*y)
--
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.