Hey everyone, I have been working with *count_ops()* so that logic
functions can also be counted as an operation but there has been a bit of
confusion about its real meaning.
See my PR https://github.com/sympy/sympy/pull/7303
Firstly, I don't want to count *"Basic(x)"* as an operation as all the
expression reaching this functions (even if they are Symbols) are
themselves instances of *"Basic"* class, and *"Expr(x).count_ops()"* also
returns 0 which is the way Sympy handles other expressions. So, Should i
include it?
Secondly, Logic functions don't raise exceptions when:
1) There are less number of arguments then required. like
* IN [1] : And(x)*
* OUT[1]: x*
2) When any argument of logic function is an empty tuple
* IN [2]: sympify(And( x, () ))*
* OUT[2]: And( (), x)*
3) Expressions which don't even make sense are executed without even a
hiccup
* IN [3]: And( x, (x,y) )*
* OUT[3]: And( x, (x,y) )*
These bugs in the logic function are resulting in all types of funny
results while using* "count_ops()" *(After my codes)*. *So , should i take
care of all these bugs in the *"count_ops()"* 's code?
Please help me by reviewing my PR https://github.com/sympy/sympy/pull/7303 as
this is for my Gsoc's patch.
Any type of help is highly appreciated. Thanks
functions can also be counted as an operation but there has been a bit of
confusion about its real meaning.
See my PR https://github.com/sympy/sympy/pull/7303
Firstly, I don't want to count *"Basic(x)"* as an operation as all the
expression reaching this functions (even if they are Symbols) are
themselves instances of *"Basic"* class, and *"Expr(x).count_ops()"* also
returns 0 which is the way Sympy handles other expressions. So, Should i
include it?
Secondly, Logic functions don't raise exceptions when:
1) There are less number of arguments then required. like
* IN [1] : And(x)*
* OUT[1]: x*
2) When any argument of logic function is an empty tuple
* IN [2]: sympify(And( x, () ))*
* OUT[2]: And( (), x)*
3) Expressions which don't even make sense are executed without even a
hiccup
* IN [3]: And( x, (x,y) )*
* OUT[3]: And( x, (x,y) )*
These bugs in the logic function are resulting in all types of funny
results while using* "count_ops()" *(After my codes)*. *So , should i take
care of all these bugs in the *"count_ops()"* 's code?
Please help me by reviewing my PR https://github.com/sympy/sympy/pull/7303 as
this is for my Gsoc's patch.
Any type of help is highly appreciated. Thanks