class_docstr: Rosenbrock function.
  
  The following optimization problem:
      minimize sum(100.0*(x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0)
class_docstr_tok: ["Rosenbrock","function",".","The","following","optimization","problem",":","minimize","sum","(","100.0","*","(","x","[","1",":","]","-","x","[",":","-1","]","*","*","2.0",")","*","*","2.0","+","(","1","-","x","[",":","-1","]",")","*","*","2.0",")"]
code: def hess(self, x):
      x = np.atleast_1d(x)
      H = np.diag(-400 * x[:-1], 1) - np.diag(400 * x[:-1], -1)
      diagonal = np.zeros(len(x), dtype=x.dtype)
      diagonal[0] = 1200 * x[0] ** 2 - 400 * x[1] + 2
      diagonal[-1] = 200
      diagonal[1:-1] = 202 + 1200 * x[1:-1] ** 2 - 400 * x[2:]
      H = H + np.diag(diagonal)
      return H
  
file_path: catboost/contrib/python/scipy/py2/scipy/optimize/tests/test_hessian_update_strategy.py
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from copy import deepcopy
  from numpy.linalg import norm
  from numpy.testing import TestCase, assert_array_almost_equal, assert_array_equal, assert_array_less, assert_raises, assert_equal, assert_, run_module_suite, assert_allclose, assert_warns, dec
  from scipy.optimize import BFGS, SR1, HessianUpdateStrategy, minimize
label_desc: Use image node_id 4 for calling the Rosenbrock obj's underlying member method code with example usage: obj.hess(x) and returns: H