code: def _central_even(f, fx, x, h):
          
          n = len(x)
          ee = np.diag(h)
          dtype = np.result_type(fx)
          hess = np.empty((n, n), dtype=dtype)
          np.outer(h, h, out=hess)
          for i in range(n):
              hess[i, i] = (f(x + 2 * ee[i, :]) - 2 * fx + f(x - 2 * ee[i, :])) / (4. * hess[i, i])
              for j in range(i + 1, n):
                  hess[i, j] = (f(x + ee[i, :] + ee[j, :])
                                - f(x + ee[i, :] - ee[j, :])
                                - f(x - ee[i, :] + ee[j, :])
                                + f(x - ee[i, :] - ee[j, :])) / (4. * hess[j, i])
                  hess[j, i] = hess[i, j]
          return hess
docs: Eq 9.