From f43975fbfb1850802e47c9b612b32800d83153d2 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Thu, 24 Mar 2022 10:27:32 +0100 Subject: [PATCH] cleanup --- python/amici/ode_export.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/amici/ode_export.py b/python/amici/ode_export.py index 9106f1a282..dd96678e30 100644 --- a/python/amici/ode_export.py +++ b/python/amici/ode_export.py @@ -435,8 +435,7 @@ def smart_jacobian(eq: sp.MutableDenseMatrix, # parallel from multiprocessing import Pool - p = Pool(n_procs) - with p: + with Pool(n_procs) as p: mapped = p.starmap(_jacobian_row, ((eq[i, :], sym_var) for i in range(eq.shape[0]))) return sp.Matrix(mapped)