fix link function tests

This commit is contained in:
Martin Bubel 2023-10-18 19:54:49 +02:00
parent 6a56872932
commit a082f5b669

View file

@ -97,13 +97,13 @@ class TestLinkFunction:
# Check that it does something sensible beyond this limit, # Check that it does something sensible beyond this limit,
# note this is not checking the value is correct, just that it isn't nan # note this is not checking the value is correct, just that it isn't nan
beyond_lim_of_inf = lim_of_inf + 100.0 beyond_lim_of_inf = lim_of_inf + 100.0
assert np.isinf(link_func.transf(beyond_lim_of_inf)) assert not np.isinf(link_func.transf(beyond_lim_of_inf))
assert np.isinf(link_func.dtransf_df(beyond_lim_of_inf)) assert not np.isinf(link_func.dtransf_df(beyond_lim_of_inf))
assert np.isinf(link_func.d2transf_df2(beyond_lim_of_inf)) assert not np.isinf(link_func.d2transf_df2(beyond_lim_of_inf))
assert np.isnan(link_func.transf(beyond_lim_of_inf)) assert not np.isnan(link_func.transf(beyond_lim_of_inf))
assert np.isnan(link_func.dtransf_df(beyond_lim_of_inf)) assert not np.isnan(link_func.dtransf_df(beyond_lim_of_inf))
assert np.isnan(link_func.d2transf_df2(beyond_lim_of_inf)) assert not np.isnan(link_func.d2transf_df2(beyond_lim_of_inf))
def test_log_overflow(self): def test_log_overflow(self):
self.setup() self.setup()