I have a fairly straightforward nested for loop that iterates over four arrays:
for a in a_grid:
for b in b_grid:
for c in c_grid:
for d in d_grid:
do_some_stuff(a,b,c,d) # perform calculations and write to file
Maybe this isn't the most efficient way to perform calculations over a 4D grid to begin with. I know joblib
is capable of parallelizing two nested for loops like this, but I'm having trouble generalizing it to four nested loops. Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…