On 23 January 2013 17:33, Isaac Won <winef...@gmail.com> wrote:
> On Wednesday, January 23, 2013 10:51:43 AM UTC-6, Oscar Benjamin wrote:
>> On 23 January 2013 14:57, Isaac Won <winef...@gmail.com> wrote:
>>
>> > On Wednesday, January 23, 2013 8:40:54 AM UTC-6, Oscar Benjamin wrote:
>>
>> Unless I've misunderstood how this function is supposed to be used, it
>> just doesn't really seem to work for arrays of much more than a few
>> hundred elements.
>>

The solution is to use UnivariateSpline. I don't know what the
difference is but it works where the other fails:

import numpy as np
from scipy.interpolate import UnivariateSpline
x = np.array(10000 * [0.0], float)
indices = np.arange(len(x))
interp = UnivariateSpline(indices, x, k=2)
print(interp(1.5))


Oscar
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to