athena.utils.sort_eigpairs

sort_eigpairs(evals, evects)[source]

Sort eigenpairs.

Parameters
Returns

vector of sorted eigenvalues; orthogonal matrix of corresponding eigenvectors.

Return type

numpy.ndarray, numpy.ndarray

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.