Skip to content

Commit 320cd79

Browse files
committed
Adding repeated intervals test
1 parent a040a58 commit 320cd79

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/test_distances.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ def test_inf_deathtime(self):
122122
dist2 = bottleneck(dgm, empty)
123123
assert (dist1 == 0.5) and (dist2 == 0.5)
124124

125+
def test_repeated(self):
126+
# Issue #44
127+
G = np.array([[ 0, 1], [0,1]])
128+
H = np.array([[ 0, 1]])
129+
dist = bottleneck(G, H)
130+
assert dist == 0.5
131+
125132
class TestWasserstein:
126133
def test_single(self):
127134
d = wasserstein(

0 commit comments

Comments
 (0)