I
Isaac Won
Hi all,
I have tried to use different interpolation methods with Scipy. My code seems just fine with linear interpolation, but shows memory error with quadratic. I am a novice for python. I will appreciate any help.
#code
f = open(filin, "r")
for columns in ( raw.strip().split() for raw in f ):
a.append(columns[5])
x = np.array(a, float)
not_nan = np.logical_not(np.isnan(x))
indices = np.arange(len(x))
interp = interp1d(indices[not_nan], x[not_nan], kind = 'quadratic')
p = interp(indices)
------------------------------------------------------------------------
The number of data is 31747.
Thank you,
Isaac
I have tried to use different interpolation methods with Scipy. My code seems just fine with linear interpolation, but shows memory error with quadratic. I am a novice for python. I will appreciate any help.
#code
f = open(filin, "r")
for columns in ( raw.strip().split() for raw in f ):
a.append(columns[5])
x = np.array(a, float)
not_nan = np.logical_not(np.isnan(x))
indices = np.arange(len(x))
interp = interp1d(indices[not_nan], x[not_nan], kind = 'quadratic')
p = interp(indices)
------------------------------------------------------------------------
The number of data is 31747.
Thank you,
Isaac