I have some time series that I want to give as input for the autoencoder. They have different lengths and I want to zero padding them to have the same length. What is the best way in python?
I am using np.append like this:
z= np.zeros(36000, dtype='int32')
st[0].data= np.append (st[0].data, z)
But the problem is that when the value of the time series suddenly changes to zero, it shows a high peak in after filtering and in the frequency domain.
I have found out that the below function is for zero padding and it has different mode to use:
np.pad ()
I assume you are trying to "fill" a float with zeros, right?
For example, instead of receiving 6.9, do you want 6.900000?
If this is your case, you can format, it like code below. But keep in mind that Python is converting your float to a string...