Skip to content

Instantly share code, notes, and snippets.

@dstansby
Last active June 29, 2018 12:49
Show Gist options
  • Save dstansby/07d862ff2597d857d1845e60534fd8c0 to your computer and use it in GitHub Desktop.
Save dstansby/07d862ff2597d857d1845e60534fd8c0 to your computer and use it in GitHub Desktop.
npools = 4
inputs = []
for i in range(npools):
inputs.append((rs[i::npools], T_perps_0[i::npools], T_pars_0[i::npools],
vs[i::npools], ns[i::npools]))
# multiprocessing pool
with Pool(npools) as p:
anis = p.map(single_tani, inputs)
out = []
for ani in anis:
out += ani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment