Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rosecers committed Nov 20, 2023
1 parent c0c7c65 commit ca19af2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/skmatter/preprocessing/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,11 @@ def fit(self, Knm, Kmm, y=None, sample_weight=None):
# but has been changed to Knm.T @ Knm @ Kmm^{-1} to avoid the memory
# overload often caused by storing n x n matrices. This is fine
# for the following trace, but should not be used for other operations.
Khat_trace = np.trace(Knm_centered.T @ Knm_centered @ np.linalg.pinv(Kmm, self.rcond))
Khat_trace = np.trace(
Knm_centered.T @ Knm_centered @ np.linalg.pinv(Kmm, self.rcond)
)

self.scale_ = np.sqrt(np.trace(Khat) / Knm.shape[0])
self.scale_ = Khat_trace / Knm.shape[0]
else:
self.scale_ = 1.0

Expand Down

0 comments on commit ca19af2

Please sign in to comment.