def test_gen_pval_anal_default(self): mat = np.array([[[1, 1, 1, 1, 0], [0, 1, 1, 1, 0], [0, 1, 1, 0, 1]], [[1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 0, 1, 0]]]) pattern_hash = np.array([5, 6]) expected = np.array([1.56, 2.56]) pval_func, n_exp = ue.gen_pval_anal(mat, pattern_hash) self.assertTrue(np.allclose(n_exp, expected)) self.assertTrue(isinstance(pval_func, types.FunctionType))
def test_gen_pval_anal_default(self): mat = np.array([[[1, 1, 1, 1, 0], [0, 1, 1, 1, 0], [0, 1, 1, 0, 1]], [[1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 0, 1, 0]]]) pattern_hash = np.array([5,6]) N = 3 expected = np.array([ 1.56, 2.56]) pval_func,n_exp = ue.gen_pval_anal(mat, N,pattern_hash) self.assertTrue(np.allclose(n_exp,expected)) self.assertTrue(isinstance(pval_func, types.FunctionType))