Skip to content

Commit

Permalink
shock_size should never be scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegrabowski committed Jun 26, 2024
1 parent 94790c7 commit 83ebb80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pymc_experimental/statespace/core/statespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,9 @@ def impulse_response_function(
init_shock = pm.MvNormal("initial_shock", mu=0, cov=Q, dims=[SHOCK_DIM])
else:
init_shock = pm.Deterministic(
"initial_shock", pt.as_tensor_variable(shock_size), dims=[SHOCK_DIM]
"initial_shock",
pt.as_tensor_variable(np.atleast_1d(shock_size)),
dims=[SHOCK_DIM],
)
shock_trajectory = pt.set_subtensor(shock_trajectory[0], init_shock)

Expand Down

0 comments on commit 83ebb80

Please sign in to comment.