Skip to content

Commit aeb5563

Browse files
aseyboldttwiecki
authored andcommitted
Do not print divergence warnings for empty trace
1 parent 0974ecc commit aeb5563

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymc3/step_methods/hmc/nuts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def _check_len(self, tuning):
420420
warnings.warn('Step size tuning was enabled throughout the whole '
421421
'trace. You might want to specify the number of '
422422
'tuning steps.')
423-
if n == len(self._divs_after_tune):
423+
if n > 0 and n == len(self._divs_after_tune):
424424
warnings.warn('Chain %s contains only diverging samples. '
425425
'The model is probably misspecified.'
426426
% self._chain_id)

0 commit comments

Comments
 (0)