@@ -505,21 +505,6 @@ def test_partial_trace_sample():
505
505
assert "b" not in idata .posterior
506
506
507
507
508
- def test_chain_idx ():
509
- # see https://github.com/pymc-devs/pymc/issues/4469
510
- with pm .Model ():
511
- mu = pm .Normal ("mu" )
512
- x = pm .Normal ("x" , mu = mu , sigma = 1 , observed = np .asarray (3 ))
513
- # note draws-tune must be >100 AND we need an observed RV for this to properly
514
- # trigger convergence checks, which is one particular case in which this failed
515
- # before
516
- idata = pm .sample (draws = 150 , tune = 10 , chain_idx = 1 )
517
-
518
- ppc = pm .sample_posterior_predictive (idata )
519
- # TODO FIXME: Assert something.
520
- ppc = pm .sample_posterior_predictive (idata )
521
-
522
-
523
508
@pytest .mark .parametrize (
524
509
"n_points, tune, expected_length, expected_n_traces" ,
525
510
[
@@ -655,7 +640,8 @@ def test_normal_scalar(self):
655
640
assert ppc ["a" ].shape == (nchains , ndraws )
656
641
657
642
# test default case
658
- ppc = pm .sample_posterior_predictive (trace , var_names = ["a" ])
643
+ idata_ppc = pm .sample_posterior_predictive (trace , var_names = ["a" ])
644
+ ppc = idata_ppc .posterior_predictive
659
645
assert "a" in ppc
660
646
assert ppc ["a" ].shape == (nchains , ndraws )
661
647
# mu's standard deviation may have changed thanks to a's observed
0 commit comments