Skip to content

Commit

Permalink
Fix code style issues with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
lint-action committed Feb 9, 2024
1 parent b514d85 commit 56ea542
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/evaluation/test_gen_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ def test_fpd():
val, err = evaluation.fpd(test_twos, test_zeros)
assert val == approx(2, rel=0.01) # 1^2 + 1^2
assert err < 1e-3

# test normalization
val, err = evaluation.fpd(test_zeros, test_zeros, normalise=False) # should have no effect
assert val == approx(0, abs=0.01)
assert err < 1e-3

val, err = evaluation.fpd(test_twos, test_zeros, normalise=False)
assert val == approx(8, rel=0.01) # 2^2 + 2^2
assert err < 1e-3
Expand All @@ -33,7 +33,11 @@ def test_fpd():
def test_kpd(num_threads):
assert evaluation.kpd(test_zeros, test_zeros, num_threads=num_threads) == approx([0, 0])
assert evaluation.kpd(test_twos, test_zeros, num_threads=num_threads) == approx([15, 0])

# test normalization
assert evaluation.kpd(test_zeros, test_zeros, normalise=False, num_threads=num_threads) == approx([0, 0])
assert evaluation.kpd(test_twos, test_zeros, normalise=False, num_threads=num_threads) == approx([624, 0])
assert evaluation.kpd(
test_zeros, test_zeros, normalise=False, num_threads=num_threads
) == approx([0, 0])
assert evaluation.kpd(
test_twos, test_zeros, normalise=False, num_threads=num_threads
) == approx([624, 0])

0 comments on commit 56ea542

Please sign in to comment.