code: def rosenbrock(x):
      """Rosenbrock objective function.
  
      Also known as the Rosenbrock's valley or Rosenbrock's banana
      function. Has a global minimum of :code:`np.ones(dimensions)` where
      :code:`dimensions` is :code:`x.shape[1]`. The search domain is
      :code:`[-inf, inf]`.
  
      Parameters
      ----------
      x : numpy.ndarray
          set of inputs of shape :code:`(n_particles, dimensions)`
  
      Returns
      -------
      numpy.ndarray
          computed cost of size :code:`(n_particles, )`
      """
  
      r = np.sum(
          100 * (x.T[1:] - x.T[:-1] ** 2.0) ** 2
          + (1 - x.T[:-1]) ** 2.0,
          axis=0,
      )
  
      return r
  
file_path: pyswarms/pyswarms/utils/functions/single_obj.py
imports: import numpy
label_desc: Use image node_id 14 for calling a global function with example usage: rosenbrock(x) and returns: r