Check regularization.
(sss_py, sss_mf, comp_tol)
| 934 | |
| 935 | |
| 936 | def _check_reg_match(sss_py, sss_mf, comp_tol): |
| 937 | """Check regularization.""" |
| 938 | info_py = sss_py.info["proc_history"][0]["max_info"]["sss_info"] |
| 939 | assert info_py is not None |
| 940 | assert len(info_py) > 0 |
| 941 | info_mf = sss_mf.info["proc_history"][0]["max_info"]["sss_info"] |
| 942 | n_in = None |
| 943 | for inf in (info_py, info_mf): |
| 944 | if n_in is None: |
| 945 | n_in = _get_n_moments(inf["in_order"]) |
| 946 | else: |
| 947 | assert n_in == _get_n_moments(inf["in_order"]) |
| 948 | assert inf["components"][:n_in].sum() == inf["nfree"] |
| 949 | assert_allclose( |
| 950 | info_py["nfree"], info_mf["nfree"], atol=comp_tol, err_msg=sss_py.filenames[0] |
| 951 | ) |
| 952 | |
| 953 | |
| 954 | @pytest.mark.slowtest |
no test coverage detected