Closed dynaryu closed 5 months ago
Thank you, but now "get_prob" does not work for previously working commands. When "pf = cpm.get_prob( Mnew, [varis['sys']], [0] )" is executed, it gives an error at "assert isinstance(M, Cpm)". When I check what type M has, it shows <class 'BNS_JT.cpm.Cpm'>. Do you have any idea..?
Not sure but it works when I tried. Please check test_prod_cpm_sys_and_comps.
p_f = cpm.get_prob(cpms_new, [varis['sys']], [0])
assert p_f == pytest.approx(0.002236, rel=1.0e-3)
Oh I found the issue. When a module is reloaded by importlib, it is assigned a slightly different name, and isinstance becomes confused : (
I changed the code so the C should have (1, *) shape, but not sure about the expected result for the test in the test_prod_cpm_sys_and_comps.