8000 TST make sure to not have ties in sparse callable NN test (#27567) · jeremiedbb/scikit-learn@30b7847 · GitHub
  • [go: up one dir, main page]

    Skip to content

    Commit 30b7847

    Browse files
    glemaitrelesteve
    andauthored
    TST make sure to not have ties in sparse callable NN test (scikit-learn#27567)
    Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
    1 parent 7dabda9 commit 30b7847

    File tree

    1 file changed

    +1
    -1
    lines changed

    1 file changed

    +1
    -1
    lines changed

    sklearn/neighbors/tests/test_neighbors.py

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -2117,7 +2117,7 @@ def sparse_metric(x, y): # Metric accepting sparse matrix input (only)
    21172117
    [[1, 1, 1, 1, 1], [1, 0, 1, 0, 1], [0, 0, 1, 0, 0]] # Population matrix
    21182118
    )
    21192119

    2120-
    Y = csr_container([[1, 1, 0, 1, 1], [1, 0, 0, 0, 1]]) # Query matrix
    2120+
    Y = csr_container([[1, 1, 0, 1, 1], [1, 0, 0, 1, 1]]) # Query matrix
    21212121

    21222122
    nn = neighbors.NearestNeighbors(
    21232123
    algorithm="brute", n_neighbors=2, metric=sparse_metric

    0 commit comments

    Comments
     (0)
    0