parameters: (u, v)
return_statement: return dist
docstring: Computes the correlation distance between two 1-D arrays.
  
      The correlation distance between `u` and `v`, is
      defined as
  
      .. math::
  
         1 - \\frac{(u - \\bar{u}) \\cdot (v - \\bar{v})}
                 {{||(u - \\bar{u})||}_2 {||(v - \\bar{v})||}_2}
  
      where :math:`\\bar{u}` is the mean of the elements of `u`
      and :math:`x \\cdot y` is the dot product of :math:`x` and :math:`y`.
  
      Parameters
      ----------
      u : (N,) array_like
          Input array.
      v : (N,) array_like
          Input array.
  
      Returns
      -------
      correlation : double
          The correlation distance between 1-D array `u` and `v`.
docstring_summary: Computes the correlation distance between two 1-D arrays.
docstring_tokens: Computes the correlation distance between two 1 - D arrays .
function: def correlation(u, v):
      """
      Computes the correlation distance between two 1-D arrays.
  
      The correlation distance between `u` and `v`, is
      defined as
  
      .. math::
  
         1 - \\frac{(u - \\bar{u}) \\cdot (v - \\bar{v})}
                 {{||(u - \\bar{u})||}_2 {||(v - \\bar{v})||}_2}
  
      where :math:`\\bar{u}` is the mean of the elements of `u`
      and :math:`x \\cdot y` is the dot product of :math:`x` and :math:`y`.
  
      Parameters
      ----------
      u : (N,) array_like
          Input array.
      v : (N,) array_like
          Input array.
  
      Returns
      -------
      correlation : double
          The correlation distance between 1-D array `u` and `v`.
  
      """
      u = _validate_vector(u)
      v = _validate_vector(v)
      umu = u.mean()
      vmu = v.mean()
      um = u - umu
      vm = v - vmu
      dist = 1.0 - np.dot(um, vm) / (norm(um) * norm(vm))
      return dist
function_tokens: def correlation ( u , v ) : u = _validate_vector ( u ) v = _validate_vector ( v ) umu = u . mean ( ) vmu = v . mean ( ) um = u - umu vm = v - vmu dist = 1.0 - np . dot ( um , vm ) / ( norm ( um ) * norm ( vm ) ) return dist