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

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/1522473.fSR3ACEKxt%40ipht-ia-004976.
For more options, visit https://groups.google.com/d/optout.

Reply via email to