如何打开.npz文件 [英] How to open an .npz file
本文介绍了如何打开.npz文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人向我发送了一个.npz文件.如何使用Python打开该文件并从中读取数据?
Someone sent me an .npz file. How can I open that file using Python, and read the data from it?
推荐答案
在python3中使用它:
use this in python3:
from numpy import load
data = load('out.npz')
lst = data.files
for item in lst:
print(item)
print(data[item])
这篇关于如何打开.npz文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文