Skip to content

Commit 0dd68ea

Browse files
committed
Remove unused argument vars in fixed_hessian
1 parent e113c34 commit 0dd68ea

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

pymc/tuning/scaling.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
from numpy import exp, log, sqrt
1818

19-
from pymc.aesaraf import hessian_diag, inputvars
19+
from pymc.aesaraf import hessian_diag
2020
from pymc.blocking import DictToArrayBijection
2121
from pymc.model import Point, modelcontext
2222
from pymc.util import get_var_name
2323

2424
__all__ = ["find_hessian", "trace_cov", "guess_scaling"]
2525

2626

27-
def fixed_hessian(point, vars=None, model=None):
27+
def fixed_hessian(point, model=None):
2828
"""
2929
Returns a fixed Hessian for any chain location.
3030
@@ -37,10 +37,6 @@ def fixed_hessian(point, vars=None, model=None):
3737
"""
3838

3939
model = modelcontext(model)
40-
if vars is None:
41-
vars = model.cont_vars
42-
vars = inputvars(vars)
43-
4440
point = Point(point, model=model)
4541

4642
rval = np.ones(DictToArrayBijection.map(point).size) / 10
@@ -84,7 +80,7 @@ def guess_scaling(point, vars=None, model=None, scaling_bound=1e-8):
8480
try:
8581
h = find_hessian_diag(point, vars, model=model)
8682
except NotImplementedError:
87-
h = fixed_hessian(point, vars, model=model)
83+
h = fixed_hessian(point, model=model)
8884
return adjust_scaling(h, scaling_bound)
8985

9086

0 commit comments

Comments
 (0)