Skip to content

Commit 2cadacb

Browse files
committed
Add test showing pre-existing bug in Advanced Mixture logprob
1 parent c806374 commit 2cadacb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

pymc/tests/logprob/test_mixture.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,27 @@ def test_hetero_mixture_binomial(p_val, size):
323323
(),
324324
0,
325325
),
326+
# Same as before but with degenerate vector parameters
327+
pytest.param(
328+
(
329+
np.array([0], dtype=pytensor.config.floatX),
330+
np.array(1, dtype=pytensor.config.floatX),
331+
),
332+
(
333+
np.array([0.5], dtype=pytensor.config.floatX),
334+
np.array(0.5, dtype=pytensor.config.floatX),
335+
),
336+
(
337+
np.array([100], dtype=pytensor.config.floatX),
338+
np.array(1, dtype=pytensor.config.floatX),
339+
),
340+
np.array([0.1, 0.5, 0.4], dtype=pytensor.config.floatX),
341+
(2,),
342+
(2,),
343+
(),
344+
0,
345+
marks=pytest.mark.xfail(IndexError, reason="Bug in AdvancedIndexing Mixture logprob"),
346+
),
326347
(
327348
(
328349
np.array(0, dtype=pytensor.config.floatX),

0 commit comments

Comments
 (0)