We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc9fd72 commit df3e56eCopy full SHA for df3e56e
pymc3/tests/test_tuning.py
@@ -1,5 +1,6 @@
1
import numpy as np
2
from numpy import inf
3
+from pymc3.step_methods.metropolis import tune
4
from pymc3.tuning import scaling, find_MAP
5
from . import models
6
@@ -32,3 +33,11 @@ def test_mle_jacobian():
32
33
map_estimate = find_MAP(method="BFGS", model=model)
34
35
np.testing.assert_allclose(map_estimate["mu_i"], truth, rtol=rtol)
36
+
37
38
+def test_tune_not_inplace():
39
+ orig_scaling = np.array([0.001, 0.1])
40
+ returned_scaling = tune(orig_scaling, acc_rate=0.6)
41
+ assert not returned_scaling is orig_scaling
42
+ assert np.all(orig_scaling == np.array([0.001, 0.1]))
43
+ pass
0 commit comments