()
| 530 | |
| 531 | |
| 532 | def test_multi_match(): |
| 533 | T = np.random.uniform(-1000, 1000, size=(2, 64)) |
| 534 | Q = np.random.uniform(-1000, 1000, size=(2, 64)) |
| 535 | |
| 536 | m = Q.shape[-1] |
| 537 | excl_zone = int(np.ceil(m / 4)) |
| 538 | max_distance = 0.3 |
| 539 | |
| 540 | left = naive_multi_match( |
| 541 | Q, |
| 542 | T, |
| 543 | excl_zone, |
| 544 | max_distance=max_distance, |
| 545 | ) |
| 546 | |
| 547 | right = match( |
| 548 | Q, |
| 549 | T, |
| 550 | max_matches=None, |
| 551 | max_distance=lambda D: max_distance, # also test lambda functionality |
| 552 | ) |
| 553 | |
| 554 | npt.assert_almost_equal(left, right) |
| 555 | |
| 556 | |
| 557 | def test_multi_match_isconstant(): |
nothing calls this directly
no test coverage detected