Skip to content

Commit 23043e2

Browse files
committed
Add comments to _bandwidth_inv_ and _normkernels_
1 parent a4aea47 commit 23043e2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/neighbors/sparse-kde.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def rij(period: np.ndarray, xi: np.ndarray, xj: np.ndarray) -> np.ndarray:
202202
print(f"RMSE_kde = {RMSE_kde:.2e}")
203203

204204
# %%
205-
# We can see that the fitted model can perfectly capture the original one. Even though we
206-
# have not specified the number of the Gaussians, it can still perform well. This
205+
# We can see that the fitted model can perfectly capture the original one. Even though
206+
# we have not specified the number of the Gaussians, it can still perform well. This
207207
# allows us to fit distributions of the data automatically at a comparable quality
208208
# within a much shorter time than scipy.

src/skmatter/neighbors/_sparsekde.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def fit(self, X, y=None, sample_weight=None):
199199
self : object
200200
Returns the instance itself.
201201
"""
202+
# Initialize/reset the cached properties, _bandwidth_inv and _normkernels
202203
self._bandwidth_inv_ = None
203204
self._normkernels_ = None
204205
self._check_dimension(X)

0 commit comments

Comments
 (0)