def test_derivative_numerically(f, z, tol=1.0e-6, 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
dataset/ETHPy150Open sympy/sympy/sympy/utilities/randtest.py/test_derivative_numerically