Skip to content

Commit 63c9717

Browse files
ferrinemichaelosthege
authored andcommitted
add shape check
1 parent 0a0a3cd commit 63c9717

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pymc3/tests/test_variational_inference.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,8 @@ def test_replacements(binomial_model_inference):
922922
assert p_s.tag.test_value.shape == p_t.tag.test_value.shape
923923
sampled = [p_s.eval() for _ in range(100)]
924924
assert any(map(operator.ne, sampled[1:], sampled[:-1])) # stochastic
925+
p_z = approx.sample_node(p_t, deterministic=True, size=10)
926+
assert p_z.shape.eval() == (10, )
925927

926928
p_d = approx.sample_node(p_t, deterministic=True)
927929
sampled = [p_d.eval() for _ in range(100)]

0 commit comments

Comments
 (0)