code: def rot_matrix(angle):
      r
  
      return np.around(np.array([[np.cos(angle), -np.sin(angle)],
                       [np.sin(angle), np.cos(angle)]], dtype='float'), 10)
docs: r"""Rotation matrix
  
      This method produces a 2x2 rotation matrix for the given input angle.
  
      Parameters
      ----------
      angle : float
          Rotation angle in radians
  
      Returns
      -------
      np.ndarray 2x2 rotation matrix
  
      Examples
      --------
      >>> from modopt.math.matrix import rot_matrix
      >>> rot_matrix(np.pi / 6)
      array([[ 0.8660254, -0.5      ],
             [ 0.5      ,  0.8660254]])
  
      Notes
      -----
      Implements the following equation:
  
      .. math::
          R(\theta) = \begin{bmatrix}
              \cos(\theta) & -\sin(\theta) \\
              \sin(\theta) & \cos(\theta)
          \end{bmatrix}