def test_combs_for_1D_input(): n, k = 3, 2 data = np.arange(n) assert np.array_equal(utils.combs(data, k), np.asarray([[0, 1], [0, 2], [1, 2]]))
def test_combs_for_1D_input(): n, k = 3, 2 data = np.arange(n) answer = np.asarray([ [0, 1], [0, 2], [1, 2], ]) assert np.array_equal(utils.combs(data, k), answer)
def test_combs_r_is_0(): n, k = 3, 0 data = np.arange(n) assert np.array_equal(utils.combs(data, k), np.asarray([]))