Skip to content

Commit

Permalink
copy array
Browse files Browse the repository at this point in the history
  • Loading branch information
twallema committed May 14, 2024
1 parent faa5fd1 commit 28f0d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/covid19_DTM/models/ODE_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def integrate(t, S, E, I, A, M_R, M_H, C_R, C_D, C_icurec, ICU_R, ICU_D, R, D, M
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Convert the number of infections to float and then copy to guarantee the array is contiguous for numba performance
dS_work = np.rint(np.nan_to_num(redistribute_infections(S, dS_work, place_eff), nan=0.0))
dS_work = np.rint(np.nan_to_num(redistribute_infections(S_post_vacc, dS_work.astype(float).copy(), place_eff), nan=0.0))

############################
## Compute system of ODEs ##
Expand Down

0 comments on commit 28f0d51

Please sign in to comment.