rotmat2axi# torchspin.rotmat2axi(R)[source]# Extract the rotation axis and angle from a rotation matrix. Parameters: R (array_like, shape (3, 3)) – Proper rotation matrix. Returns: n (ndarray, shape (3,)) – Unit rotation axis. rho (float) – Rotation angle in radians (in [0, π]).