Skip to content

Commit 83ebb80

Browse files
shock_size should never be scalar
1 parent 94790c7 commit 83ebb80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pymc_experimental/statespace/core/statespace.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,9 @@ def impulse_response_function(
16641664
init_shock = pm.MvNormal("initial_shock", mu=0, cov=Q, dims=[SHOCK_DIM])
16651665
else:
16661666
init_shock = pm.Deterministic(
1667-
"initial_shock", pt.as_tensor_variable(shock_size), dims=[SHOCK_DIM]
1667+
"initial_shock",
1668+
pt.as_tensor_variable(np.atleast_1d(shock_size)),
1669+
dims=[SHOCK_DIM],
16681670
)
16691671
shock_trajectory = pt.set_subtensor(shock_trajectory[0], init_shock)
16701672

0 commit comments

Comments
 (0)