Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

count_ops() returns 0 for logic expressions #7010

Closed
sympy-issue-migrator opened this issue Jun 29, 2013 · 1 comment · Fixed by #7303
Closed

count_ops() returns 0 for logic expressions #7010

sympy-issue-migrator opened this issue Jun 29, 2013 · 1 comment · Fixed by #7303
Labels
Bug imported logic Wrong Result The output produced by SymPy is mathematically incorrect.

Comments

@sympy-issue-migrator
Copy link

>>> import sympy
>>> sympy.sympify("a+b").count_ops()
1
>>> sympy.sympify("a+b+c").count_ops()
2
>>> sympy.sympify("Or(a,b)").count_ops()
0
>>> from sympy.logic.boolalg import Or   #not sure when and why it is required
>>> sympy.sympify("Or(a,b)").count_ops()
0
>>> sympy.sympify("Or(a,Or(b,c))").count_ops()
0
>>> sympy.sympify("a|b").count_ops()
0

Original issue for #7010: http://code.google.com/p/sympy/issues/detail?id=3911
Original author: https://code.google.com/u/117410852413913309498/

@asmeurer
Copy link
Member

asmeurer commented Jul 4, 2013

**Status:** Valid  

Original comment: http://code.google.com/p/sympy/issues/detail?id=3911#c1
Original author: https://code.google.com/u/asmeurer@gmail.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug imported logic Wrong Result The output produced by SymPy is mathematically incorrect.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants