One optimization is to allocate the result array once like so:

import numpy as np
from scipy.interpolate import interp1d

z = np.asarray([200,300,400,500,600])
out = np.zeros( [ni, len(z)], dtype=np.float32 ) 
for i in range(ni):
    f = interp1d(x[i,:], y[i,:], kind='linear')
    out[i,:]=f(z)


This will save you some memory copying that occurs in your implementation, which occurs in the calls to out.append(...).

Scipy Fast 1-D interpolation without any loop
New to Objective C. I have created a few directories which contain pdf files for an iPhone app. How can I delete a directory and its contents using NSFileManager?

Do I need to loop through and remove the contents first? Any code samples would be much appreciated.

Thanks in advance.
