Status: New
Owner: plaes800
Labels: Type-Defect Priority-Medium

New issue 1494 by plaes800: eq.subs fails for Derivative(u(t)**2, t**2)
http://code.google.com/p/sympy/issues/detail?id=1494

Following code fails with traceback:

#!/usr/bin/python
from sympy import *

t = Symbol("t")
u, F = map(Function, ['u', 'F'])
eq = Eq(Derivative(u(t)**2, t**2))
print eq
print eq.subs(u(t), F(t))

[/snip]

Traceback (most recent call last):
   File "./subs.py", line 17, in <module>
     print eq.subs(u(t), F(t))
   File "/home/plaes/code/sympy/sympy/core/basic.py", line 971, in subs
     return self._subs_old_new(old, new)
   File "/home/plaes/code/sympy/sympy/core/cache.py", line 85, in wrapper
     func_cache_it_cache[k] = r = func(*args, **kw_args)
   File "/home/plaes/code/sympy/sympy/core/basic.py", line 980, in  
_subs_old_new
     return self._eval_subs(old, new)
   File "/home/plaes/code/sympy/sympy/core/relational.py", line 139, in  
_eval_subs
     return self.__class__(self.lhs._eval_subs(old, new),  
self.rhs._eval_subs(old, new))
   File "/home/plaes/code/sympy/sympy/core/function.py", line 619, in  
_eval_subs
     return Derivative(*map(lambda x: x._eval_subs(old, new), self.args),  
**{'evaluate': True})
   File "/home/plaes/code/sympy/sympy/core/function.py", line 578, in __new__
     raise ValueError('Invalid literal: %s is not a valid variable' % s)
ValueError: Invalid literal: t**2 is not a valid variable


--
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 sympy-issues@googlegroups.com
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to