def rotation_matrix ( sigma ) : radians = sigma * np . pi / 180.0 r11 = np . cos ( radians ) r12 = - np . sin ( radians ) r21 = np . sin ( radians ) r22 = np . cos ( radians ) R = np . array ( [ [ r11 , r12 ] , [ r21 , r22 ] ] ) return R
python rotation matrix 2 euler
def rotation_matrix(sigma):
    """

    https://en.wikipedia.org/wiki/Rotation_matrix

    """

    radians = sigma * np.pi / 180.0

    r11 = np.cos(radians)
    r12 = -np.sin(radians)
    r21 = np.sin(radians)
    r22 = np.cos(radians)

    R = np.array([[r11, r12], [r21, r22]])

    return R