I use np.save
to save numpy array , I want to save this numpy array as an image without frame.
I tried to do this using plt.savefig
but it did't work.I am trying for more than 2 weeks to find how I can do it.
Any help would be appreciated.
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'