@spiceErrorCheck<EOL>def diags2(symmat):
symmat = stypes.toDoubleMatrix(symmat)<EOL>diag = stypes.emptyDoubleMatrix(x=<NUM_LIT:2>, y=<NUM_LIT:2>)<EOL>rotateout = stypes.emptyDoubleMatrix(x=<NUM_LIT:2>, y=<NUM_LIT:2>)<EOL>libspice.diags2_c(symmat, diag, rotateout)<EOL>return stypes.cMatrixToNumpy(diag), stypes.cMatrixToNumpy(rotateout)<EOL>
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