code: def axis_transform(pca_axes):
      
      from_ = N.identity(3)
      to_ = pca_axes
  
      # Find inverse transform for forward transform
      # y = M x -> M = y (x)^(-1)
      # We don't need to do least-squares since
      # there is a simple transformation
      trans_matrix = N.linalg.lstsq(from_,to_)[0]
      return trans_matrix
docs: Creates an affine transformation matrix to
      rotate data in PCA axes into Cartesian plane