code: def diags2(symmat):
      
      symmat = stypes.toDoubleMatrix(symmat)
      diag = stypes.emptyDoubleMatrix(x=2, y=2)
      rotateout = stypes.emptyDoubleMatrix(x=2, y=2)
      libspice.diags2_c(symmat, diag, rotateout)
      return stypes.cMatrixToNumpy(diag), stypes.cMatrixToNumpy(rotateout)
docs: Diagonalize a symmetric 2x2 matrix.
  
      http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/diags2_c.html
  
      :param symmat: A symmetric 2x2 matrix.
      :type symmat: 2x2-Element Array of floats
      :return:
              A diagonal matrix similar to symmat,
              A rotation used as the similarity transformation.
      :rtype: tuple