Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions tests/distributions/test_multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2121,24 +2121,25 @@ def ref_rand(size, n, eta):
size=1000,
)

@pytest.mark.parametrize(
argnames="shape",
argvalues=[
(2,),
pytest.param(
(3, 2),
marks=pytest.mark.xfail(
raises=NotImplementedError,
reason="LKJCorr logp is only implemented for vector values (ndim=1)",
),

@pytest.mark.parametrize(
argnames="shape",
argvalues=[
(2,),
pytest.param(
(3, 2),
marks=pytest.mark.xfail(
raises=NotImplementedError,
reason="LKJCorr logp is only implemented for vector values (ndim=1)",
),
],
)
def test_default_transform(self, shape):
with pm.Model() as m:
x = pm.LKJCorr("x", n=2, eta=1, shape=shape)
assert isinstance(m.rvs_to_transforms[x], MultivariateIntervalTransform)
assert m.logp(sum=False)[0].type.shape == shape[:-1]
),
],
)
def test_default_transform(shape):
with pm.Model() as m:
x = pm.LKJCorr("x", n=2, eta=1, shape=shape)
assert isinstance(m.rvs_to_transforms[x], MultivariateIntervalTransform)
assert m.logp(sum=False)[0].type.shape == shape[:-1]


class TestLKJCholeskyCov(BaseTestDistributionRandom):
Expand Down