From 2acb5f9f17c8266d4bfec7de7949c275bd70e771 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 15 Mar 2022 11:40:06 +0100 Subject: [PATCH] Fixed multiproc import --- swash/processing/sws_npz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swash/processing/sws_npz.py b/swash/processing/sws_npz.py index 7aef1cd..06c02c6 100644 --- a/swash/processing/sws_npz.py +++ b/swash/processing/sws_npz.py @@ -1,7 +1,7 @@ import argparse import configparser import logging -from multiprocessing import ThreadPool +from multiprocessing.pool import Pool import pathlib import numpy as np @@ -39,7 +39,7 @@ var = { } inp.mkdir(exist_ok=True) -with ThreadPool() as pool: +with Pool() as pool: pool.map( lambda name, f: np.save( inp.joinpath(name), f(sws_out.joinpath(name).with_suffix(".dat"))