Skip to content

Commit 9aa232f

Browse files
committed
Fix for #7369: return scalar for sampler stats
1 parent dc7cfee commit 9aa232f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymc/step_methods/metropolis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ class DEMetropolisZ(ArrayStepShared):
10911091
"accept": (np.float64, []),
10921092
"accepted": (bool, []),
10931093
"tune": (bool, []),
1094-
"scaling": (np.float64, []),
1094+
"scaling": (np.float64, [None]),
10951095
"lambda": (np.float64, []),
10961096
}
10971097

@@ -1214,7 +1214,7 @@ def astep(self, q0: RaveledVars) -> tuple[RaveledVars, StatsType]:
12141214

12151215
stats = {
12161216
"tune": self.tune,
1217-
"scaling": self.scaling,
1217+
"scaling": np.mean(self.scaling),
12181218
"lambda": self.lamb,
12191219
"accept": np.exp(accept),
12201220
"accepted": accepted,

0 commit comments

Comments
 (0)