Skip to content
Snippets Groups Projects
Commit 2451ded3 authored by pswain's avatar pswain
Browse files

fix(growth_rate): for running in parallel

Error was in asking for non-existing cells.
parent 464050a5
No related branches found
No related tags found
No related merge requests found
......@@ -238,7 +238,11 @@ def run_parallel(t, volume, buddings_df, buddings, no_cells, config):
t_batch = [t for i in range(batch_size)]
for idx in range(0, no_cells, batch_size):
print(f" mother {idx:d}/{no_cells-1:d}")
v_batch = [volume[idx + i, :] for i in range(batch_size)]
if idx + batch_size < no_cells:
v_batch = [volume[idx + i, :] for i in range(batch_size)]
else:
v_batch = [volume[i, :] for i in range(idx, no_cells)]
t_batch = [t for i in range(len(v_batch))]
res_batch = pool.map(batch_GP, t_batch, v_batch)
for ires in res_batch:
if ires:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment