Skip to content

Commit

Permalink
in-place operation (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
krosenfeld-IDM authored Nov 22, 2024
1 parent 673045f commit a792730
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/laser_generic/transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def __call__(self, model, tick) -> None:

np.multiply(contagion, beta_effective, out=forces)
np.divide(forces, model.patches.populations[tick, :], out=forces) # per agent force of infection
np.expm1(-forces, out=forces)
np.negative(forces, out=forces)
np.expm1(forces, out=forces)
np.negative(forces, out=forces)

# TODO: This is a hack to handle the different transmission dynamics for all of these SIS, SI, SIR, SEIR, ... models.
Expand Down

0 comments on commit a792730

Please sign in to comment.