Skip to content

Commit 8d400de

Browse files
committed
Revert "fix(entropy): use symmetric eigensolver for covariance matrices"
This reverts commit 222bd96.
1 parent 222bd96 commit 8d400de

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

CodeEntropy/entropy/vibrational.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,16 @@ def _entropy_components(
139139

140140
@staticmethod
141141
def _matrix_eigenvalues(matrix: np.ndarray) -> np.ndarray:
142-
"""Compute eigenvalues of a real symmetric covariance matrix."""
143-
matrix = np.asarray(matrix, dtype=float)
144-
145-
if matrix.ndim != 2 or matrix.shape[0] != matrix.shape[1]:
146-
raise ValueError(f"Expected square matrix, got shape={matrix.shape}")
142+
"""Compute eigenvalues of a matrix.
147143
148-
matrix = 0.5 * (matrix + matrix.T)
144+
Args:
145+
matrix: Input matrix.
149146
150-
return la.eigvalsh(matrix)
147+
Returns:
148+
Eigenvalues as a NumPy array.
149+
"""
150+
matrix = np.asarray(matrix, dtype=float)
151+
return la.eigvals(matrix)
151152

152153
def _convert_lambda_units(self, lambdas: np.ndarray) -> np.ndarray:
153154
"""Convert eigenvalues into SI units using run_manager.

0 commit comments

Comments
 (0)