(cls, A)
return np.dot(A, R)
Rotate a 2D projection A so the first axis (row in A) is aligned with
        vector (1, 0).
Rotate a 2D projection A so the first axis (row in A) is aligned with
        vector (1, 0).
Rotate a 2D projection A so the first axis ( row in A ) is aligned with vector ( 1 0 ) .
def _rotate(cls, A):
        """
        Rotate a 2D projection A so the first axis (row in A) is aligned with
        vector (1, 0).
        """
        assert A.ndim == 2 and A.shape[1] == 2
        phi = np.arctan2(A[0, 1], A[0, 0])
        R = [[np.cos(-phi), np.sin(-phi)],
             [-np.sin(-phi), np.cos(-phi)]]
        return np.dot(A, R)
def _rotate ( cls , A ) : assert A . ndim == 2 and A . shape [ 1 ] == 2 phi = np . arctan2 ( A [ 0 , 1 ] , A [ 0 , 0 ] ) R = [ [ np . cos ( - phi ) , np . sin ( - phi ) ] , [ - np . sin ( - phi ) , np . cos ( - phi ) ] ] return np . dot ( A , R )