Skip to content

Commit d6204d9

Browse files
authored
fix chempot_diagram (materialsproject#4072)
1 parent 150f816 commit d6204d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pymatgen/analysis/chempot_diagram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ def simple_pca(data: np.ndarray, k: int = 2) -> tuple[np.ndarray, np.ndarray, np
646646
Returns:
647647
tuple: projected data, eigenvalues, eigenvectors
648648
"""
649-
data -= np.mean(data.T, axis=1) # centering the data
649+
data = data - np.mean(data.T, axis=1) # centering the data
650650
cov = np.cov(data.T) # calculating covariance matrix
651651
v, w = np.linalg.eig(cov) # performing eigendecomposition
652652
idx = v.argsort()[::-1] # sorting the components

0 commit comments

Comments
 (0)