| 75 | |
| 76 | @pytest.mark.parametrize("T", test_data) |
| 77 | def test_mmotifs_max_matches_none(T): |
| 78 | motif_distances_ref = np.array([[0.0000000e00, 1.1151008e-07]]) |
| 79 | motif_indices_ref = np.array([[2, 9]]) |
| 80 | motif_subspaces_ref = [np.array([1])] |
| 81 | motif_mdls_ref = [np.array([232.0, 250.57542476, 260.0, 271.3509059])] |
| 82 | |
| 83 | m = 4 |
| 84 | excl_zone = int(np.ceil(m / config.STUMPY_EXCL_ZONE_DENOM)) |
| 85 | P, I = naive.mstump(T, m, excl_zone) |
| 86 | ( |
| 87 | motif_distances_cmp, |
| 88 | motif_indices_cmp, |
| 89 | motif_subspaces_cmp, |
| 90 | motif_mdls_cmp, |
| 91 | ) = mmotifs(T, P, I, max_matches=None) |
| 92 | |
| 93 | npt.assert_array_almost_equal(motif_distances_ref, motif_distances_cmp) |
| 94 | npt.assert_array_almost_equal(motif_indices_ref, motif_indices_cmp) |
| 95 | npt.assert_array_almost_equal(motif_subspaces_ref, motif_subspaces_cmp) |
| 96 | npt.assert_array_almost_equal(motif_mdls_ref, motif_mdls_cmp) |
| 97 | |
| 98 | |
| 99 | @pytest.mark.parametrize("T", test_data) |