Memory error with quadratic interpolation

Isaac Won winefrog at
Wed Jan 23 05:06:41 CET 2013

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.

f = open(filin, "r")
for columns in ( raw.strip().split() for raw in f ):
        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,


More information about the Python-list mailing list