Skip to content

Commit

Permalink
Replace cumsum broadcast with accumulate
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs authored Oct 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 21fb991 commit 3f68792
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EpiAware/src/EpiInfModels/ExpGrowthRate.jl
Original file line number Diff line number Diff line change
@@ -116,5 +116,5 @@ I_t = generated_quantities(latent_inf, θ)
"
@model function EpiAwareBase.generate_latent_infs(epi_model::ExpGrowthRate, rt)
init_incidence ~ epi_model.initialisation_prior
return exp.(init_incidence .+ cumsum(rt))
return exp.(accumulate(+, rt; init=init_incidence))
end

0 comments on commit 3f68792

Please sign in to comment.