问题描述
我使用np.save
保存numpy数组,我想将此numpy数组另存为没有框架的图像。
我尝试使用plt.savefig
进行此操作,但没有成功。我尝试了2个多星期的时间才能找到解决方法。
任何帮助将不胜感激。
def saveSignalsOndisk(signalsBlock,nSpectogram):
global SecondPartPathOutput
global FirstPartPathOutput
global legendOfOutput
global isPreictal
if not os.path.exists(FirstPartPathOutput):
os.makedirs(FirstPartPathOutput)
if not os.path.exists(FirstPartPathOutput+SecondPartPathOutput):
os.makedirs(FirstPartPathOutput+SecondPartPathOutput)
print('HERE\n')
print(FirstPartPathOutput+SecondPartPathOutput+'/spec_'+isPreictal+'_'+str(nSpectogram-signalsBlock.shape[0])+'_'+str(nSpectogram-1))
print('HERE\n')
np.save(FirstPartPathOutput+SecondPartPathOutput+'/spec_'+isPreictal+'_'+str(nSpectogram-signalsBlock.shape[0])+'_'+str(nSpectogram-1),signalsBlock)
legendOfOutput=legendOfOutput+str(nSpectogram-signalsBlock.shape[0])+' '+str(nSpectogram-1) +' '+SecondPartPathOutput+'/spec_'+isPreictal+'_'+str(nSpectogram-signalsBlock.shape[0])+'_'+str(nSpectogram-1) +'.npy\n'
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)