| 660 | |
| 661 | |
| 662 | def test_motifs_with_max_matches_none(): |
| 663 | T = np.random.rand(16) |
| 664 | m = 3 |
| 665 | |
| 666 | max_motifs = 1 |
| 667 | max_matches = None |
| 668 | max_distance = np.inf |
| 669 | cutoff = np.inf |
| 670 | |
| 671 | # performant |
| 672 | mp = naive.stump(T, m, row_wise=True) |
| 673 | comp_distance, comp_indices = motifs( |
| 674 | T, |
| 675 | mp[:, 0].astype(np.float64), |
| 676 | min_neighbors=1, |
| 677 | max_distance=max_distance, |
| 678 | cutoff=cutoff, |
| 679 | max_matches=max_matches, |
| 680 | max_motifs=max_motifs, |
| 681 | ) |
| 682 | |
| 683 | ref_len = len(T) - m + 1 |
| 684 | |
| 685 | npt.assert_(ref_len >= comp_distance.shape[1]) |
| 686 | npt.assert_(ref_len >= comp_indices.shape[1]) |