(Q, T)
| 502 | |
| 503 | @pytest.mark.parametrize("Q, T", test_data) |
| 504 | def test_match_mean_stddev_isconstant(Q, T): |
| 505 | m = Q.shape[0] |
| 506 | excl_zone = int(np.ceil(m / 4)) |
| 507 | max_distance = 0.3 |
| 508 | |
| 509 | left = naive_match( |
| 510 | Q, |
| 511 | T, |
| 512 | excl_zone, |
| 513 | max_distance=max_distance, |
| 514 | ) |
| 515 | |
| 516 | T_subseq_isconstant = naive.rolling_isconstant(T, m) |
| 517 | M_T, Σ_T = naive.compute_mean_std(T, len(Q)) |
| 518 | |
| 519 | right = match( |
| 520 | Q, |
| 521 | T, |
| 522 | M_T, |
| 523 | Σ_T, |
| 524 | max_matches=None, |
| 525 | max_distance=lambda D: max_distance, # also test lambda functionality |
| 526 | T_subseq_isconstant=T_subseq_isconstant, |
| 527 | ) |
| 528 | |
| 529 | npt.assert_almost_equal(left, right) |
| 530 | |
| 531 | |
| 532 | def test_multi_match(): |
nothing calls this directly
no test coverage detected