| 51 | @pytest.mark.filterwarnings("ignore:\\s+Port 8787 is already in use:UserWarning") |
| 52 | @pytest.mark.parametrize("T, m", test_data) |
| 53 | def test_maamped_include(T, m, dask_cluster): |
| 54 | with Client(dask_cluster) as dask_client: |
| 55 | for width in range(T.shape[0]): |
| 56 | for i in range(T.shape[0] - width): |
| 57 | include = np.asarray(range(i, i + width + 1)) |
| 58 | |
| 59 | excl_zone = int(np.ceil(m / 4)) |
| 60 | |
| 61 | ref_P, ref_I = naive.maamp(T, m, excl_zone, include) |
| 62 | comp_P, comp_I = maamped(dask_client, T, m, include) |
| 63 | |
| 64 | npt.assert_almost_equal(ref_P, comp_P) |
| 65 | npt.assert_almost_equal(ref_I, comp_I) |
| 66 | |
| 67 | |
| 68 | @pytest.mark.filterwarnings("ignore:\\s+Port 8787 is already in use:UserWarning") |