[Scipy-tickets] [SciPy] #282: scipy.interpolate.UniveriateSpline.integral broken.

SciPy scipy-tickets at scipy.net
Mon Oct 9 15:05:33 CDT 2006

#282: scipy.interpolate.UniveriateSpline.integral broken.
 Reporter:  mforbes            |       Owner:  somebody                           
     Type:  defect             |      Status:  new                                
 Priority:  normal             |   Milestone:                                     
Component:  scipy.interpolate  |     Version:  devel                              
 Severity:  normal             |    Keywords:  integral interpolate fitpack splint
 == Synopsis ==
 scipy.interpolate.UniveriateSpline.integral and
 scipy.interpolate.InterpolatedUniveriateSpline.integral are broken.

 >>> import scipy.interpolate
 >>> s = scipy.interpolate.UnivariateSpline([0,1,2,3],[0,1,4,9])
 >>> s.integral(0,1)
 0-th dimension must be fixed to 8 but got 4
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/data/apps/python//lib/python/scipy/interpolate/fitpack2.py", line
 184, in integral
     return dfitpack.splint(*(self._eval_args+(a,b)))
 dfitpack.error: failed in converting 2nd argument `c' of dfitpack.splint
 to C/Fortran array

 == Details ==
 The integral function is defined in fitpack2.py:
     def integral(self, a, b):
         """ Return definite integral of the spline between two
         given points.
         return dfitpack.splint(*(self._eval_args+(a,b)))

 == Resolution ==
 I do not understand enough about splint yet to provide useful information

Ticket URL: <http://projects.scipy.org/scipy/scipy/ticket/282>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list