Skip to content

Commit

Permalink
test_kdtree: Relax test accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Jan 21, 2024
1 parent 12e0028 commit cc27f47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_kdtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_kdtree():

# check that nearest.distance calculates the correct distance
# (subject to rounding error)
assert nearest.distance == pytest.approx(np.linalg.norm(corpus[nearest.index] - target))
assert nearest.distance == pytest.approx(np.linalg.norm(corpus[nearest.index] - target), abs=1e-6)

def test_kdtree_validation():
corpus = np.random.uniform(0, 10, [1024, 2])
Expand Down

0 comments on commit cc27f47

Please sign in to comment.