def test_get_far(self): """Ensures correct output from get_far; input values are non-zero.""" this_far = model_eval.get_far(CONTINGENCY_TABLE_THRESHOLD_HALF) self.assertTrue(numpy.isclose( this_far, FAR_THRESHOLD_HALF, atol=TOLERANCE ))
def test_get_far_all_zeros(self): """Ensures correct output from get_far; input values are all zero.""" this_far = model_eval.get_far(CONTINGENCY_TABLE_ALL_ZEROS) self.assertTrue(numpy.isnan(this_far))