Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
cjnolet committed May 13, 2022
1 parent 589a9c4 commit aced187
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/cuml/neighbors/nearest_neighbors.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class NearestNeighbors(Base,
- ``'rbc'``: for the random ball algorithm, which partitions
the data space and uses the triangle inequality to lower the
number of potential distances. Currently, this algorithm
supports 2d Euclidean and Haversine.
supports Haversine (2d) and Euclidean in 2d and 3d.
- ``'brute'``: for brute-force, slow but produces exact results
- ``'ivfflat'``: for inverted file, divide the dataset in partitions
and perform search on relevant partitions only
Expand Down Expand Up @@ -710,8 +710,9 @@ class NearestNeighbors(Base,
n_neighbors > math.sqrt(self.X_m.shape[0])

if fallback_to_brute:
warnings.warn("sqrt(%s) < n_neighbors (%s). "
"falling back to brute force search" %
warnings.warn("algorithm='rbc' requires sqrt(%s) be "
"> n_neighbors (%s). falling back to "
"brute force search" %
(self.X_m.shape[0], n_neighbors))

if self.working_algorithm_ == 'brute' or fallback_to_brute:
Expand Down

0 comments on commit aced187

Please sign in to comment.