self._testGradient(
        functools.partial(func, i=2), [3.0, 1.0, 4.0, 1.0, 1.0, 0.0, 2.0, 1.0],
        [0., 0., 30., 30., 0., 0., 0., 0.])