| 111 | |
| 112 | @pytest.mark.filterwarnings("ignore:\\s+Port 8787 is already in use:UserWarning") |
| 113 | def test_maamped_constant_subsequence_self_join(dask_cluster): |
| 114 | with Client(dask_cluster) as dask_client: |
| 115 | T_A = np.concatenate( |
| 116 | (np.zeros(20, dtype=np.float64), np.ones(5, dtype=np.float64)) |
| 117 | ) |
| 118 | T = np.array([T_A, T_A, np.random.rand(T_A.shape[0])]) |
| 119 | m = 3 |
| 120 | |
| 121 | excl_zone = int(np.ceil(m / 4)) |
| 122 | |
| 123 | ref_P, ref_I = naive.maamp(T, m, excl_zone) |
| 124 | comp_P, comp_I = maamped(dask_client, T, m) |
| 125 | |
| 126 | npt.assert_almost_equal(ref_P, comp_P) # ignore indices |
| 127 | |
| 128 | |
| 129 | @pytest.mark.filterwarnings("ignore:\\s+Port 8787 is already in use:UserWarning") |