| 286 | |
| 287 | @pytest.mark.parametrize("T_A, T_B", test_data) |
| 288 | def test_scraamp_A_B_join_full(T_A, T_B): |
| 289 | m = 3 |
| 290 | |
| 291 | ref_mp = naive.aamp(T_A, m, T_B=T_B) |
| 292 | ref_P = ref_mp[:, 0] |
| 293 | ref_I = ref_mp[:, 1] |
| 294 | ref_left_I = ref_mp[:, 2] |
| 295 | ref_right_I = ref_mp[:, 3] |
| 296 | |
| 297 | approx = scraamp( |
| 298 | T_A, m, T_B, ignore_trivial=False, percentage=1.0, pre_scraamp=False |
| 299 | ) |
| 300 | approx.update() |
| 301 | comp_P = approx.P_ |
| 302 | comp_I = approx.I_ |
| 303 | comp_left_I = approx.left_I_ |
| 304 | comp_right_I = approx.right_I_ |
| 305 | |
| 306 | naive.replace_inf(ref_P) |
| 307 | naive.replace_inf(comp_P) |
| 308 | |
| 309 | npt.assert_almost_equal(ref_P, comp_P) |
| 310 | npt.assert_almost_equal(ref_I, comp_I) |
| 311 | npt.assert_almost_equal(ref_left_I, comp_left_I) |
| 312 | npt.assert_almost_equal(ref_right_I, comp_right_I) |
| 313 | |
| 314 | ref_mp = aamp(T_A, m, T_B=T_B, ignore_trivial=False) |
| 315 | ref_P = ref_mp[:, 0] |
| 316 | ref_I = ref_mp[:, 1] |
| 317 | ref_left_I = ref_mp[:, 2] |
| 318 | ref_right_I = ref_mp[:, 3] |
| 319 | |
| 320 | npt.assert_almost_equal(ref_P, comp_P) |
| 321 | npt.assert_almost_equal(ref_I, comp_I) |
| 322 | npt.assert_almost_equal(ref_left_I, comp_left_I) |
| 323 | npt.assert_almost_equal(ref_right_I, comp_right_I) |
| 324 | |
| 325 | |
| 326 | @pytest.mark.parametrize("T_A, T_B", test_data) |