Derivative: fix .subs(self, something)
commit17d0ad249c39637a82bb993f560c6754aa7a137c
authorKirill Smelkov <kirr@landau.phys.spbu.ru>
Sat, 16 Aug 2008 20:56:44 +0000 (17 00:56 +0400)
committerKirill Smelkov <kirr@landau.phys.spbu.ru>
Sat, 16 Aug 2008 20:56:44 +0000 (17 00:56 +0400)
treec11d24cd5fb0f8958846c2aeede379be913284f5
parent96dc509bbb4cc75426110181117fc619a1503d71
Derivative: fix .subs(self, something)

it used not to recognize it should do the substitution:

In [1]: d = f(x).diff(x)

In [2]: d
Out[2]:
d
──(f(x))
dx

In [3]: d.subs(d, y)
Out[3]:
d
──(f(x))
dx

Out[3] is wrong -- should be y

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Ondrej Certik <ondrej@certik.cz>
sympy/core/function.py
sympy/core/tests/test_functions.py