def _lmder1_rosenbrock():
    """Rosenbrock function (lmder test #4)"""

    def func(params, vec):
        vec[0] = 10 * (params[1] - params[0]**2)
        vec[1] = 1 - params[0]

    def jac(params, jac):
        jac[0,0] = -20 * params[0]
        jac[0,1] = -1
        jac[1,0] = 10
        jac[1,1] = 0

    guess = np.asfarray([-1.2, 1])
    norm1s = [0.491934955050e+01, 0.134006305822e+04, 0.1430000511923e+06]

    for i in range(3):
        _lmder1_driver(2, func, jac, guess * 10**i,
                       norm1s[i], 0, [1, 1])
Rosenbrock function (lmder test #4)