[SciPy-user] question to spline interpolation

Robert Kern robert.kern at gmail.com
Thu Nov 23 15:19:50 EST 2006


Christian Meesters wrote:
> Hoi,
> 
> Perhaps a dump question, but I can't find a solution:
> I have a smooth, continous 1D curve, represented in an numpy array, wich I 
> want to interpolate. The data in y start from zero and should an on zero.
> 
> My script (pseudocode):
> 
> from scipy import interpolate
> 
> x_new = arange(0, x_max, x_max/110) 
> #x being the data points of the abscissa
> #x_max is the maximum value in x

By the way, you will almost certainly want to use linspace instead:

  x_new = linspace(0.0, x_max, 110)

Depending on your data, that may or may not be the cause of the problem.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco



More information about the SciPy-User mailing list