Skip to content

Commit ca19af2

Browse files
committed
Linting
1 parent c0c7c65 commit ca19af2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/skmatter/preprocessing/_data.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,11 @@ def fit(self, Knm, Kmm, y=None, sample_weight=None):
528528
# but has been changed to Knm.T @ Knm @ Kmm^{-1} to avoid the memory
529529
# overload often caused by storing n x n matrices. This is fine
530530
# for the following trace, but should not be used for other operations.
531-
Khat_trace = np.trace(Knm_centered.T @ Knm_centered @ np.linalg.pinv(Kmm, self.rcond))
531+
Khat_trace = np.trace(
532+
Knm_centered.T @ Knm_centered @ np.linalg.pinv(Kmm, self.rcond)
533+
)
532534

533-
self.scale_ = np.sqrt(np.trace(Khat) / Knm.shape[0])
535+
self.scale_ = Khat_trace / Knm.shape[0]
534536
else:
535537
self.scale_ = 1.0
536538

0 commit comments

Comments
 (0)