numpy 处理腌制数据的问题
我有大量数据保存为 .npy 文件。该数据的某些部分存储为字典列表,其中字典的每个值都是一个 numpy 数组。我使用 np.save
和 allow_pickle=True
存储所有这些。
最近,我尝试加载数据并收到以下错误: UnpicklingError: invalid load key, '\x00'.
我不知道为什么会发生这种情况,但我认为这可能是因为 pickling加载文件被中断。关于如何解决这个问题有什么想法吗?我希望至少能拿回一些数据。
编辑:文件位于: https://www.dropbox.com /s/x8le962wx724fpq/model.npy?dl=0
不幸的是,它几乎有 100 MB;这是我能找到的最小文件,我还没有弄清楚如何复制该错误。
I have a large amount of data saved as .npy files. Some portion of this data is stored as a list of dictionaries, where each value of the dictionary is a numpy array. I store all of these using np.save
with allow_pickle=True
.
Recently, I tried to load the data and received the following error: UnpicklingError: invalid load key, '\x00'.
I have no idea why this is occurring, though I think it may be because the pickling load file was interrupted. Any ideas on how to solve this? I'm hoping I can at least get some of the data back.
EDIT: The file is here: https://www.dropbox.com/s/x8le962wx724fpq/model.npy?dl=0
Unfortunately, it's almost 100 MB; this is the smallest file I could find and I haven't worked out how to replicate the error yet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论