Skip to content

Commit

Permalink
Set n_neighbors as keyword arg for NearestNeighbors
Browse files Browse the repository at this point in the history
  • Loading branch information
dburkhardt committed Aug 9, 2020
1 parent 712d5d0 commit be85023
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion graphtools/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ def build_kernel_to_data(
search_knn = min(search_knn * self.search_multiplier, knn_max)
if search_knn > self.data_nu.shape[0] / 2:
knn_tree = NearestNeighbors(
search_knn, algorithm="brute", n_jobs=self.n_jobs
n_neighbors=search_knn,
algorithm="brute",
n_jobs=self.n_jobs
).fit(self.data_nu)
if len(update_idx) > 0:
if search_knn == knn_max:
Expand Down

0 comments on commit be85023

Please sign in to comment.