mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-30 23:36:23 +02:00
fix link function tests
This commit is contained in:
parent
6a56872932
commit
a082f5b669
1 changed files with 6 additions and 6 deletions
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue