Skip to content

Commit

Permalink
Appease pre-commit + sum incidence across strains
Browse files Browse the repository at this point in the history
  • Loading branch information
kokbent committed Nov 3, 2023
1 parent a2982a0 commit 23568c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion mechanistic_compartments.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import matplotlib.pyplot as plt
import numpy as np
import numpyro
import numpyro.distributions as dist
import pandas as pd
from diffrax import ODETerm, SaveAt, Tsit5, diffeqsolve
from jax.random import PRNGKey
Expand Down
3 changes: 2 additions & 1 deletion model_odes/seir_model_v5.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def _seirw_ode(state, _, parameters):
di = jnp.add(jnp.zeros(i.shape), jnp.add(de_to_i, -di_to_r))
dr = jnp.add(jnp.zeros(r.shape), jnp.add(di_to_r, -dr_to_w))

dw_to_e = jnp.sum(dw_to_e, axis=2)
ds_to_e = jnp.sum(ds_to_e, axis=1) # across strains
dw_to_e = jnp.sum(dw_to_e, axis=[1, 2]) # across strains & w compartments
incidence = ds_to_e + dw_to_e
return [(ds, de, di, dr, dw), incidence]

Expand Down

0 comments on commit 23568c0

Please sign in to comment.