Status: Accepted
Owner: asmeurer
Labels: Type-Defect Priority-Medium

New issue 2134 by asmeurer: Derivative of Lambda does not work
http://code.google.com/p/sympy/issues/detail?id=2134

There is a bug with diff and Lambda:

In [31]: Lambda(z, z*log(x - z)).diff(x)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/Users/aaronmeurer/Documents/Python/sympy/sympy/<ipython console> in <module>()

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/expr.py in diff(self, *symbols, **assumptions)
    859         if not "evaluate" in assumptions:
    860             assumptions["evaluate"] = True
--> 861         ret = Derivative(self, *new_symbols, **assumptions)
    862         return ret
    863

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/function.pyc in __new__(cls, expr, *symbols, **assumptions)
    583             if not expr.has(s):
    584                 return S.Zero
--> 585             obj = expr._eval_derivative(s)
    586             if obj is None:
    587                 unevaluated_symbols.append(s)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/function.pyc in _eval_derivative(self, s)
    274                 continue
    275             if isinstance(self.func, FunctionClass):
--> 276                 df = self.fdiff(i)
    277                 l.append(df * da)
    278         return Add(*l)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/function.pyc in fdiff(self, argindex)
    449                 nargs = self.nargs
    450             if not (1<=argindex<=nargs):
--> 451 raise TypeError("argument index %r is out of range [1,%s]" % (argindex,nargs))
    452         return Derivative(self,self.args[argindex-1],evaluate=False)
    453

TypeError: argument index 2 is out of range [1,1]

See issue 2132.

--
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.

Reply via email to