Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 3041 by [email protected]: tryring to replace a Tuple with subs
fails
http://code.google.com/p/sympy/issues/detail?id=3041
<This originally appeared in issue 2497 and has been moved to its own issue
here:>
I ran into Tuple trouble the other day when trying to do substitutions
because I couldn't replace it with something else during subs because it
doesn't have Expr methods:
>>> eq
1 + Sum(x, (x, 1, 2))
>>> eq.subs(Tuple(x, 1, 2), Tuple(x, 1, 3))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sympy\core\basic.py", line 735, in subs
return self._subs_old_new(old, new)
File "sympy\core\cache.py", line 103, in wrapper
func_cache_it_cache[k] = r = func(*args, **kw_args)
File "sympy\core\basic.py", line 744, in _subs_old_new
return self._eval_subs(old, new)
File "sympy\core\add.py", line 350, in _eval_subs
coeff_old, terms_old = old.as_coeff_add()
AttributeError: 'Tuple' object has no attribute 'as_coeff_add'
--
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.