1
Fork 0

Fixed multiproc import

This commit is contained in:
Edgar P. Burkhart 2022-03-15 11:40:06 +01:00
parent e1dc67d089
commit 441eec78d4
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -1,7 +1,7 @@
import argparse import argparse
import configparser import configparser
import logging import logging
from multiprocessing import ThreadPool from multiprocessing.pool import Pool
import pathlib import pathlib
import numpy as np import numpy as np
@ -39,7 +39,7 @@ var = {
} }
inp.mkdir(exist_ok=True) inp.mkdir(exist_ok=True)
with ThreadPool() as pool: with Pool() as pool:
pool.map( pool.map(
lambda name, f: np.save( lambda name, f: np.save(
inp.joinpath(name), f(sws_out.joinpath(name).with_suffix(".dat")) inp.joinpath(name), f(sws_out.joinpath(name).with_suffix(".dat"))