Skip to content

Commit 7499bfd

Browse files
authored
Extend Error handling in run_inference_algorithm
Minor change.
1 parent f12fc38 commit 7499bfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blackjax/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def run_inference_algorithm(
182182
init_key, sample_key = split(rng_key, 2)
183183
try:
184184
initial_state = inference_algorithm.init(initial_state_or_position, init_key)
185-
except TypeError:
185+
except (TypeError, ValueError, AttributeError):
186186
# We assume initial_state is already in the right format.
187187
initial_state = initial_state_or_position
188188

0 commit comments

Comments
 (0)