コード例 #1
0
ファイル: test_npdist.py プロジェクト: skinnersrat/dit
def test_is_homogeneous2():
    outcomes = ['00', '01']
    pmf = [1 / 2] * 2
    d = Distribution(outcomes, pmf)
    assert not d.is_homogeneous()
コード例 #2
0
ファイル: test_npdist.py プロジェクト: psychon7/dit
def test_is_homogeneous1():
    outcomes = ['00', '11']
    pmf = [1 / 2, 1 / 2]
    d = Distribution(outcomes, pmf)
    assert d.is_homogeneous()
コード例 #3
0
ファイル: test_npdist.py プロジェクト: chebee7i/dit
def test_is_homogeneous1():
    outcomes = ['00', '11']
    pmf = [1/2, 1/2]
    d = Distribution(outcomes, pmf)
    assert_true(d.is_homogeneous())
コード例 #4
0
ファイル: test_npdist.py プロジェクト: chebee7i/dit
def test_is_homogeneous2():
    outcomes = ['00', '01']
    pmf = [1/2, 1/2]
    d = Distribution(outcomes, pmf)
    assert_false(d.is_homogeneous())
コード例 #5
0
ファイル: test_npdist.py プロジェクト: liangkai/dit
def test_is_homogeneous2():
    outcomes = ['00', '01']
    pmf = [1 / 2, 1 / 2]
    d = Distribution(outcomes, pmf)
    assert_false(d.is_homogeneous())