From 28f0d51d4ddc3246f2f5b5848a6f159ceb95ebad Mon Sep 17 00:00:00 2001 From: twallema Date: Tue, 14 May 2024 16:10:26 +0200 Subject: [PATCH] copy array --- src/covid19_DTM/models/ODE_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/covid19_DTM/models/ODE_models.py b/src/covid19_DTM/models/ODE_models.py index 6eefc62f..7cab0703 100644 --- a/src/covid19_DTM/models/ODE_models.py +++ b/src/covid19_DTM/models/ODE_models.py @@ -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 ##