Skip to content

Commit 9b1c3a2

Browse files
committed
fix flake8
1 parent 501eb95 commit 9b1c3a2

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

simpleder/der.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ def check_input(hyp):
2929
raise TypeError("Start and end must be float numbers.")
3030
if element[1] > element[2]:
3131
raise ValueError("Start must not be larger than end.")
32-
num_elements = len(hyp)
33-
3432

3533

3634
def compute_total_length(hyp):
@@ -72,7 +70,7 @@ def compute_load_length(ref, hyp):
7270
maximum number of speakers at any given time point.
7371
7472
Equation:
75-
Load = \int max(N_ref(t), N_hyp(t)) dt
73+
Load = \\int max(N_ref(t), N_hyp(t)) dt
7674
7775
where N_ref(t) is the number of speakers in reference at time t, and
7876
N_hyp(t) is the number of speakers in hypothesis at time t.

tests/det_test.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ def test_wrong_speaker_type(self):
3737
der.check_input(hyp)
3838

3939

40-
41-
4240
class TestComputeIntersectionLength(unittest.TestCase):
4341
"""Tests for the compute_intersection_length function."""
4442

@@ -69,8 +67,6 @@ def test_example(self):
6967
self.assertEqual(8.0, der.compute_total_length(hyp))
7068

7169

72-
73-
7470
class TestComputeLoadLength(unittest.TestCase):
7571
"""Tests for the compute_load_length function."""
7672

@@ -266,8 +262,6 @@ def test_overlap_confusion(self):
266262
ref = [("A", 0.0, 1.0)]
267263
hyp = [("B", 0.0, 1.0)]
268264
# If A can map to B, DER is 0.
269-
# But if we force mismatch? (hard to force with simple API unless labels differ globally)
270-
# Here they just match A->B. DER=0.
271265
self.assertEqual(0.0, der.DER(ref, hyp))
272266

273267
def test_overlap_confusion_enforced(self):

0 commit comments

Comments
 (0)