Permalink
Browse files

ENH: Allow arbitrary values for the weights. Allow non-decreasing order

of the x values rather than strictly increasing.
  • Loading branch information...
1 parent 2aef960 commit 10c890b5f1cc1be839731e2ca061c1d3eb54d56f @charris charris committed Jul 18, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 scipy/interpolate/fitpack/curfit.f
@@ -230,9 +230,9 @@ subroutine curfit(iopt,m,x,y,w,xb,xe,k,s,nest,n,t,c,fp,
if(m.lt.k1 .or. nest.lt.nmin) go to 50
lwest = m*k1+nest*(7+3*k)
if(lwrk.lt.lwest) go to 50
- if(xb.gt.x(1) .or. xe.lt.x(m) .or. w(1).le.0.) go to 50
+ if(xb.gt.x(1) .or. xe.lt.x(m)) go to 50
do 10 i=2,m
- if(x(i-1).ge.x(i) .or. w(i).le.0.) go to 50
+ if(x(i-1).gt.x(i)) go to 50
10 continue
if(iopt.ge.0) go to 30
if(n.lt.nmin .or. n.gt.nest) go to 50
@@ -247,7 +247,6 @@ subroutine curfit(iopt,m,x,y,w,xb,xe,k,s,nest,n,t,c,fp,
go to 50
30 if(s.lt.0.) go to 50
if(s.eq.0. .and. nest.lt.(m+k1)) go to 50
- ier = 0
c we partition the working space and determine the spline approximation.
40 ifp = 1
iz = ifp+nest

0 comments on commit 10c890b

Please sign in to comment.