code: def project(u, v):
      r
  
      return np.inner(v, u) / np.inner(u, u) * u
docs: r"""Project vector
  
      This method projects vector v onto vector u.
  
      Parameters
      ----------
      u : np.ndarray
          Input vector
      v : np.ndarray
          Input vector
  
      Returns
      -------
      np.ndarray projection
  
      Examples
      --------
      >>> from modopt.math.matrix import project
      >>> a = np.arange(3)
      >>> b = a + 3
      >>> project(a, b)
      array([ 0. ,  2.8,  5.6])
  
      Notes
      -----
      Implements the following equation:
  
      .. math::
          \textrm{proj}_\mathbf{u}(\mathbf{v}) = \frac{\langle\mathbf{u},
          \mathbf{v}\rangle}{\langle\mathbf{u}, \mathbf{u}\rangle}\mathbf{u}
  
      (see https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process)