Skip to content

Commit

Permalink
TST make sure to not have ties in sparse callable NN test (scikit-lea…
Browse files Browse the repository at this point in the history
…rn#27567)

Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
  • Loading branch information
glemaitre and lesteve authored Oct 11, 2023
1 parent 7dabda9 commit 30b7847
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/neighbors/tests/test_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,7 @@ def sparse_metric(x, y): # Metric accepting sparse matrix input (only)
[[1, 1, 1, 1, 1], [1, 0, 1, 0, 1], [0, 0, 1, 0, 0]] # Population matrix
)

Y = csr_container([[1, 1, 0, 1, 1], [1, 0, 0, 0, 1]]) # Query matrix
Y = csr_container([[1, 1, 0, 1, 1], [1, 0, 0, 1, 1]]) # Query matrix

nn = neighbors.NearestNeighbors(
algorithm="brute", n_neighbors=2, metric=sparse_metric
Expand Down

0 comments on commit 30b7847

Please sign in to comment.