Skip to content

Commit c20024c

Browse files
committed
test no batch
1 parent d143629 commit c20024c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/test_fps.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ def test_fps(dtype, device):
2323

2424
out = fps(x, batch, ratio=0.5, random_start=False)
2525
assert out.tolist() == [0, 2, 4, 6]
26+
27+
out = fps(x, ratio=0.5, random_start=False)
28+
assert out.sort()[0].tolist() == [0, 5, 6, 7]

test/test_nearest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ def test_nearest(dtype, device):
3131

3232
out = nearest(x, y, batch_x, batch_y)
3333
assert out.tolist() == [0, 0, 1, 1, 2, 2, 3, 3]
34+
35+
out = nearest(x, y)
36+
assert out.tolist() == [0, 0, 1, 1, 2, 2, 3, 3]

0 commit comments

Comments
 (0)