保存hdf5文件“: with h5py.File("name.hdf5",'w') as f: f.create_dataset('predict', data=no2_p, compression="gzip", compression_opts=5) 读取hdf5文件: import h5py with h5py.File("name.hdf5",'r') as f: print(f.keys()) predict= f.get("predict")[:]