TimeSeries-GAN icon indicating copy to clipboard operation
TimeSeries-GAN copied to clipboard

ValueError: Expected 1D or 2D array, got 0D array instead #4

Open ankitvijayvargiya29 opened this issue 4 years ago • 5 comments

ankitvijayvargiya29 avatar Mar 08 '20 10:03 ankitvijayvargiya29

Hey, Even I am receiving the same error. can you suggest some ways to correct it?

RaunakKumarVerma avatar Jan 31 '21 15:01 RaunakKumarVerma

getting the same error. Does anyone have any luck on this?

nahidalam avatar Aug 02 '21 20:08 nahidalam

Looks like this issue is due to https://github.com/numancelik34/TimeSeries-GAN/blob/master/conv1d_gan.py#L248

The 2nd and third parameters of np.savetxt should be the actual array to be saved. But nmn_label[i] in line 248 is an integer, not an array.

nahidalam avatar Aug 02 '21 22:08 nahidalam

@nahidalam edit line 248 : np.savetxt('test_cat_nc%d%d.csv' % (i,step), nmn_label[i],delimiter=',') to np.savetxt('test_cat_nc%d%d.csv' % (i,step), nmn_label[i].reshape(-1,1),delimiter=',') Hope this helps you~~

gitwetguy avatar Sep 05 '21 16:09 gitwetguy

@gitwetguy I modified as suggested but still the error comes

MritulaC avatar Jan 12 '22 08:01 MritulaC