Hello
Concerning sympy.core.expr.Expr.coeff in presence of non-commuting variables
The docs [1] state that (in presence of non-commuting variables) when there is more that one coefficient, coeff returns 0.
Eg (from SympyLive)
n, m, o = symbols('n m o', commutative=False)
>>> (n*m + o*n).coeff(n)
0
This built-in behavior sounds weird to me: if zero is always returned, how to know that we are in the case of more than coefficient?
I would have expected some information useful to reconstruct the polynomial like a tuple (Left_coefficient, Right_coefficent), i.e. (o,m) in the example.
ric
[1]
http://docs.sympy.org/dev/modules/core.html?highlight=coeff#sympy.core.expr.Expr.coeff