Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium
New issue 2749 by [email protected]: subs(Dict) does not work
http://code.google.com/p/sympy/issues/detail?id=2749
In [22]: x.subs(Dict({x:1}))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/Users/aaronmeurer/Documents/python/sympy/sympy/<ipython-input-22-b2781e48ee87>
in
<module>()
----> 1 x.subs(Dict({x:1}))
/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/core/basic.pyc in
subs(self, *args)
699 return self._subs_dict(sequence)
700 elif iterable(sequence):
--> 701 return self._subs_list(sequence)
702 else:
703 raise TypeError("Not an iterable container")
/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/core/basic.pyc in
_subs_list(self, sequence)
736 """
737 result = self
--> 738 for old, new in sequence:
739 if hasattr(result, 'subs'):
740 result = result.subs(old, new)
TypeError: 'Symbol' object is not iterable
In [24]: x.subs(Dict({x:1}).items())
Out[24]: 1
--
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.