Skip to content

Commit

Permalink
Update distance_test.py: Update Hamming distance test (#520)
Browse files Browse the repository at this point in the history
Update Hamming distance test to reflect normalized values
  • Loading branch information
cococo2000 committed May 16, 2024
1 parent cc3a748 commit 1a171c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/distance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ def test_hamming():

p = numpy.array([1, 1, 0, 0], dtype=numpy.bool_)
q = numpy.array([1, 0, 0, 1], dtype=numpy.bool_)
assert dist(p, q) == pytest.approx(2)
assert dist(p, q) == pytest.approx(0.5)

p = numpy.array([1, 1, 0, 0])
q = numpy.array([1, 0, 0, 1])
assert dist(p, q) == pytest.approx(2)
assert dist(p, q) == pytest.approx(0.5)


def test_angular():
Expand Down

0 comments on commit 1a171c5

Please sign in to comment.