Exemplo n.º 1
0
def test_IndependentProductPSpace():
    X = Normal('X', 0, 1)
    Y = Normal('Y', 0, 1)
    px = X.pspace
    py = Y.pspace
    assert pspace(X + Y) == IndependentProductPSpace(px, py)
    assert pspace(X + Y) == IndependentProductPSpace(py, px)
Exemplo n.º 2
0
def test_pspace():
    X, Y = Normal('X', 0, 1), Normal('Y', 0, 1)

    raises(ValueError, lambda: pspace(5 + 3))
    raises(ValueError, lambda: pspace(x < 1))
    assert pspace(X) == X.pspace
    assert pspace(2 * X + 1) == X.pspace
    assert pspace(2 * X + Y) == IndependentProductPSpace(Y.pspace, X.pspace)