Comment #1 on issue 1864 by smichr: AttributeError: is_commutative with
Mul(Pow(2, 2, evaluate=False), 3, evaluate=False) + 1
http://code.google.com/p/sympy/issues/detail?id=1864
A workaround for this is the doit method (if expr.new is changed to
expr.fun):
a=Mul(Pow(2, 2, evaluate=False), 3, evaluate=False)
a.func(*a.args)+1
13
a.new
<bound method Mul.new of 2**2*3>
a.func
<class 'sympy.core.mul.Mul'>
doit uses .new rather than .func From what I read in the docstrings, I see
that func
and new differ in that new uses assumptions to build a similar object. I
assume,
then, that func does not. So what is the better approach, 1) to use func
rather than
new or 2) to use new but give it the evaluate=True assumption. Will (2)
even work?
Changing .new to .func in doit doesn't break anything in the pre-new-polys
sympy, but
I don't know if that is the right way to go.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
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.