| 251 | |
| 252 | @pytest.mark.parametrize("T, m", test_data) |
| 253 | def test_maamp_wrapper_include(T, m): |
| 254 | for width in range(T.shape[0]): |
| 255 | for i in range(T.shape[0] - width): |
| 256 | include = np.asarray(range(i, i + width + 1)) |
| 257 | |
| 258 | excl_zone = int(np.ceil(m / 4)) |
| 259 | |
| 260 | ref_P, ref_I = naive.maamp(T, m, excl_zone, include) |
| 261 | comp_P, comp_I = maamp(T, m, include) |
| 262 | |
| 263 | npt.assert_almost_equal(ref_P, comp_P) |
| 264 | npt.assert_almost_equal(ref_I, comp_I) |
| 265 | |
| 266 | df = pd.DataFrame(T.T) |
| 267 | comp_P, comp_I = maamp(df, m, include) |
| 268 | |
| 269 | npt.assert_almost_equal(ref_P, comp_P) |
| 270 | npt.assert_almost_equal(ref_I, comp_I) |
| 271 | |
| 272 | |
| 273 | def test_constant_subsequence_self_join(): |