athena.utils.sort_eigpairs¶
-
sort_eigpairs
(evals, evects)[source]¶ Sort eigenpairs.
- Parameters
evals (numpy.ndarray) – eigenvalues.
evects (numpy.ndarray) – eigenvectors.
- Returns
vector of sorted eigenvalues; orthogonal matrix of corresponding eigenvectors.
- Return type
Note
Eigenvectors are unique up to a sign. We make the choice to normalize the eigenvectors so that the first component of each eigenvector is positive. This normalization is very helpful for the bootstrapping.