[sympy] Re: Need help with tests

2012-07-07 Thread Saurabh Jha
This is the code along with documentation from sympy import diff, integrate, sympify, expand, Symbol x=Symbol('x') def Delta(expr, d = 1): """Takes as input function expression and returns the diffrence between final value(function's expression incremented to 1) and initial value (function

Re: [sympy] Re: Need help with tests

2012-07-08 Thread Aaron Meurer
It doesn't work because you've hard-coded the symbol x into the function, and then used a different one in the tests (Symbol("x", real=True) != Symbol("x")). Generally functions like this take a parameter for the variable, like Delta(expr, x, d=1). Unrelated: why are you using integrate to compute