if data_file.endswith('npy'):
self.data = np.load(data_file)
elif data_file.endswith('mat'):
self.data = scipy.io.loadmat(data_file)
self.data = self.data['feat']
elif data_file.endswith('npz'):
self.data = np.load(data_file)
self.data = self.data['feat']
python 根据不同的文件类型读取数据
最新推荐文章于 2024-05-16 21:41:01 发布