[SciPy-User] Cython vs Vectorized Numpy vs MATLAB
Wed Nov 16 04:03:34 CST 2011
16.11.2011 01:15, Jaidev Deshpande kirjoitti:
> 1. Why does the 'spline.m' function in MATLAB perform much faster than
> the same interpolation in NumPy?
> (In MATLAB the first function call takes time but the subsequent calls
> are much faster.)
It's a completely different algorithm. The routines in scipy.interpolate
try to find the best knots for the spline, whereas the Matlab one is a
simple cubic spline interpolation using the data points as the knots.
More information about the SciPy-User