def test_derivative_numerically(f, z, tol=1e-06, a=2, b=(-1), c=3, d=1):
 from sympy.core.function import Derivative
 z0 = random_complex_number(a, b, c, d)
 f1 = f.diff(z).subs(z, z0)
 f2 = Derivative(f, z).doit_numerically(z0)
 return comp(f1.n(), f2.n(), tol)

def test_derivative_numerically ( f , z , tol = 1e-06 , a = 2 , b = ( - 1 ) , c = 3 , d = 1 ) : from sympy . core . function import Derivative z0 = random_complex_number ( a , b , c , d ) f1 = f . diff ( z ) . subs ( z , z0 ) f2 = Derivative ( f , z ) . doit_numerically ( z0 ) return comp ( f1 . n ( ) , f2 . n ( ) , tol )
test numerically that the symbolically computed derivative of f with respect to z is correct .