code: def rosenbrock(p):
      """
      -2.048<=xi<=2.048
      函数全局最优点在一个平滑、狭长的抛物线山谷内，使算法很难辨别搜索方向，查找最优也变得十分困难
      在(1,...,1)处可以找到极小值0
      :param p:
      :return:
      """
      n_dim = len(p)
      res = 0
      for i in range(n_dim - 1):
          res += 100 * np.square(
              np.square(p[i]) - p[i + 1]
          ) + np.square(p[i] - 1)
      return res
  
file_path: scikit-opt/sko/demo_func.py
imports: import numpy
  from scipy import spatial
label_desc: Use image node_id 7 for calling a global function with example usage: rosenbrock(p) and returns: res