输入:包含数组的列表arrays_list,以及包含每个数组存储位置的列表save_path_list
from concurrent.futures import ThreadPoolExecutor, as_completed
from tqdm import tqdm
from scipy.io import *
def save_array_to_mat(array, filepath):savemat(filepath, {'data': array})def save_arrays_in_threads(arrays_list, save_path_list):with ThreadPoolExecutor(max_workers=32) as executor:futures = [executor.submit(save_array_to_mat, array, sp) for array, sp in zip(arrays_list, save_path_list)]for _ in tqdm(as_completed(futures), total=len(futures)):pass