Exemple #1
0
def test_is_pmf():
    ops = LinearOperations()

    pmf = np.asarray([0.5, 0.5])
    assert v.is_pmf(pmf, ops)

    pmf = np.array([0.6, 0.7])
    assert not v.is_pmf(pmf, ops)

    pmf = np.array([1.6, -0.6])
    assert not v.is_pmf(pmf, ops)
Exemple #2
0
def test_is_pmf():
    ops = LinearOperations()

    pmf = np.asarray([0.5, 0.5])
    assert_true(v.is_pmf(pmf, ops))

    pmf = np.array([0.6, 0.7])
    assert_false(v.is_pmf(pmf, ops))

    pmf = np.array([1.6, -0.6])
    assert_false(v.is_pmf(pmf, ops))
Exemple #3
0
def test_is_pmf():
    ops = LinearOperations()

    pmf = np.asarray([0.5, 0.5])
    assert_true(v.is_pmf(pmf, ops))

    pmf = np.array([0.6, 0.7])
    assert_false(v.is_pmf(pmf, ops))

    pmf = np.array([1.6, -0.6])
    assert_false(v.is_pmf(pmf, ops))
Exemple #4
0
def test_validate_pmf():
    # Already covered by other tests
    ops = LinearOperations()
    pmf = np.asarray([0.5, 0.5])
    assert v.is_pmf(pmf, ops)
Exemple #5
0
def test_validate_pmf():
    # Already covered by other tests
    ops = LinearOperations()
    pmf = np.asarray([0.5, 0.5])
    assert_true(v.is_pmf(pmf, ops))