Comment #12 on issue 2128 by asmeurer: cannot integrate piecewise function
numerically
http://code.google.com/p/sympy/issues/detail?id=2128
I think .has() is what you want, i.e.,
In [12]: (x - z).has(y)
Out[12]: False
In [13]: (x - y).has(y)
Out[13]: True
You can also use the in operator:
In [14]: y in x - y
Out[14]: True
In [15]: y in x - z
Out[15]: False
Actually, I'm not really sure what the difference between the two is.
And I think there's no need to separate steps 1-3. cond.args[0].has(sym)
should handle both cases.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.