def test_hessian_computation(self):
        x = T.scalar('x')
        y = T.scalar('y')

        f = x ** 2 + y ** 3 + 7 * x * y
        hessian, gradient = find_hessian_and_gradient(f, [x, y])

        func = theano.function([x, y], [hessian, gradient])
        hessian_output, gradient_output = func(1, 2)

        np.testing.assert_array_almost_equal(
            hessian_output,
            np.array([
                [2, 7],
                [7, 12],
            ])
        )
dataset/ETHPy150Open itdxer/neupy/tests/algorithms/gd/test_hessian.py/HessianTestCase.test_hessian_computation/original