I am quite new to python and am using the sympy library to work on some 
mathematical code using the parser input. The problem is that it parses the 
coefficient of x as the constant when there is no constant in the 
expression. Below is a simple example of what am trying to explain.
>>> parse_expr("2x", transformations=transformations)
2x
>>> eqn= parse_expr("2x", transformations=transformations)
>>> eqn.coeff('x',0)
2
>>> eqn.coeff('x')
2
]
 At least am very sure eqn.coeff('x',0) which is a constant is eqn  to 0 
 in this equation but the compiler says it is 2.

-- 
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/16ac5b41-fb76-494d-b407-5f1087447c4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to