如何在python中显示和绘制二进制文件?

时间:2017-04-05 15:29:28

标签: python

我需要在python中显示和绘制二进制文件。我尝试使用此代码:

import matplotlib.pyplot as plt 
import numpy as np
path= "filename.bin"
dataArray= np.load(path)
test= dataArray.shape
print(test)
print (dataArray)
print (dataArray.shape)
plt.plot(dataArray.T)
plt.show()

但是,它不起作用。 这是错误:

 "Failed to interpret file %s as a pickle" % repr(file))
IOError: Failed to interpret file 'filename.bin' as a pickle

0 个答案:

没有答案