Skip to content

Commit 34e3f45

Browse files
committed
MAINT Convert some examples to new sample() api. Adapt tests.
1 parent 85e0f9d commit 34e3f45

10 files changed

+361
-626
lines changed

docs/source/notebooks/BEST.ipynb

Lines changed: 25 additions & 58 deletions
Large diffs are not rendered by default.

docs/source/notebooks/GLM-hierarchical.ipynb

Lines changed: 27 additions & 109 deletions
Large diffs are not rendered by default.

docs/source/notebooks/LKJ.ipynb

Lines changed: 36 additions & 64 deletions
Large diffs are not rendered by default.

docs/source/notebooks/NUTS_scaling_using_ADVI.ipynb

Lines changed: 111 additions & 87 deletions
Large diffs are not rendered by default.

docs/source/notebooks/cox_model.ipynb

Lines changed: 46 additions & 45 deletions
Large diffs are not rendered by default.

docs/source/notebooks/marginalized_gaussian_mixture_model.ipynb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,9 @@
292292
}
293293
],
294294
"metadata": {
295+
"anaconda-cloud": {},
295296
"kernelspec": {
296-
"display_name": "Python 3",
297+
"display_name": "Python [default]",
297298
"language": "python",
298299
"name": "python3"
299300
},
@@ -307,11 +308,7 @@
307308
"name": "python",
308309
"nbconvert_exporter": "python",
309310
"pygments_lexer": "ipython3",
310-
"version": "3.5.1"
311-
},
312-
"widgets": {
313-
"state": {},
314-
"version": "1.1.2"
311+
"version": "3.5.2"
315312
}
316313
},
317314
"nbformat": 4,

docs/source/notebooks/pmf-pymc.ipynb

Lines changed: 55 additions & 88 deletions
Large diffs are not rendered by default.

docs/source/notebooks/posterior_predictive.ipynb

Lines changed: 34 additions & 99 deletions
Large diffs are not rendered by default.

docs/source/notebooks/stochastic_volatility.ipynb

Lines changed: 21 additions & 61 deletions
Large diffs are not rendered by default.

pymc3/tests/test_sampling.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,9 @@ def test_sample(self):
6464
def test_sample_init(self):
6565
with self.model:
6666
for init in ('advi', 'advi_map', 'map', 'nuts'):
67-
for sampler in ('nuts', 'hmc', 'advi'):
68-
if (sampler == 'advi') and (init != 'advi'):
69-
self.assertRaises(ValueError, pm.sample_init,
70-
init=init, sampler=sampler,
71-
n_init=1000)
72-
else:
73-
pm.sample_init(init=init, sampler=sampler,
74-
n_init=1000, draws=50,
75-
random_seed=self.random_seed)
67+
pm.sample(init=init,
68+
n_init=1000, draws=50,
69+
random_seed=self.random_seed)
7670

7771

7872
def test_iter_sample(self):

0 commit comments

Comments
 (0)