[Scipy-svn] r4576 - branches/Interpolate1D
scipy-svn at scipy.org
scipy-svn at scipy.org
Tue Jul 29 10:11:58 EDT 2008
Author: fcady
Date: 2008-07-29 09:11:52 -0500 (Tue, 29 Jul 2008)
New Revision: 4576
Modified:
branches/Interpolate1D/fitpack.pyf
branches/Interpolate1D/fitpack_wrapper.py
branches/Interpolate1D/interpolate1d.py
branches/Interpolate1D/setup.py
Log:
fixed dta-removal bug
Modified: branches/Interpolate1D/fitpack.pyf
===================================================================
--- branches/Interpolate1D/fitpack.pyf 2008-07-29 06:10:46 UTC (rev 4575)
+++ branches/Interpolate1D/fitpack.pyf 2008-07-29 14:11:52 UTC (rev 4576)
@@ -1,7 +1,7 @@
! -*- f90 -*-
! Author: Pearu Peterson <pearu at cens.ioc.ee>
!
-python module dfitpack ! in
+python module _dfitpack ! in
usercode '''
@@ -475,5 +475,5 @@
real*8 :: dblint
end function dblint
end interface
-end python module dfitpack
+end python module _dfitpack
Modified: branches/Interpolate1D/fitpack_wrapper.py
===================================================================
--- branches/Interpolate1D/fitpack_wrapper.py 2008-07-29 06:10:46 UTC (rev 4575)
+++ branches/Interpolate1D/fitpack_wrapper.py 2008-07-29 14:11:52 UTC (rev 4576)
@@ -19,7 +19,7 @@
import numpy as np
-import dfitpack # extension module containing FITPACK subroutines in Fortran
+import _dfitpack # extension module containing FITPACK subroutines in Fortran
class Spline(object):
@@ -69,7 +69,7 @@
def init_xy(self, x, y):
#_data == x,y,w,xb,xe,k,s,n,t,c,fp,fpint,nrdata,ier
- data = dfitpack.fpcurf0(x, y, self._k, w=self._w,
+ data = _dfitpack.fpcurf0(x, y, self._k, w=self._w,
xb=self._bbox[0], xe=self._bbox[1], s=self._s)
if data[-1]==1:
# nest too small, setting to maximum bound
@@ -95,7 +95,7 @@
fpint.resize(nest)
nrdata.resize(nest)
args = data[:8] + (t,c,n,fpint,nrdata,data[13])
- data = dfitpack.fpcurf1(*args)
+ data = _dfitpack.fpcurf1(*args)
return data
def set_smoothing_factor(self, s):
@@ -109,7 +109,7 @@
'LSQ spline with fixed knots')
return
args = data[:6] + (s,) + data[7:]
- data = dfitpack.fpcurf1(*args)
+ data = _dfitpack.fpcurf1(*args)
if data[-1]==1:
# nest too small, setting to maximum bound
data = self._reset_nest(data)
@@ -125,8 +125,8 @@
if self._is_initialized:
if len(x) == 0: return np.array([]) #hack to cope with shape (0,)
if nu is None:
- return dfitpack.splev(*(self._eval_args+(x,)))
- return dfitpack.splder(nu=nu,*(self._eval_args+(x,)))
+ return _dfitpack.splev(*(self._eval_args+(x,)))
+ return _dfitpack.splder(nu=nu,*(self._eval_args+(x,)))
else:
raise TypeError, "x and y must be set before interpolation is possible"
@@ -155,11 +155,11 @@
""" Return definite integral of the spline between two
given points.
"""
- return dfitpack.splint(*(self._eval_args+(a,b)))
+ return _dfitpack.splint(*(self._eval_args+(a,b)))
def derivatives(self, x):
""" Return all derivatives of the spline at the point x."""
- d,ier = dfitpack.spalde(*(self._eval_args+(x,)))
+ d,ier = _dfitpack.spalde(*(self._eval_args+(x,)))
assert ier==0,`ier`
return d
@@ -170,7 +170,7 @@
"""
k = self._data[5]
if k==3:
- z,m,ier = dfitpack.sproot(*self._eval_args[:2])
+ z,m,ier = _dfitpack.sproot(*self._eval_args[:2])
assert ier==0,`ier`
return z[:m]
raise NotImplementedError,\
Modified: branches/Interpolate1D/interpolate1d.py
===================================================================
--- branches/Interpolate1D/interpolate1d.py 2008-07-29 06:10:46 UTC (rev 4575)
+++ branches/Interpolate1D/interpolate1d.py 2008-07-29 14:11:52 UTC (rev 4576)
@@ -210,9 +210,8 @@
# FIXME: don't allow copying multiple times.
# FIXME : allow no copying, in case user has huge dataset
- self._remove_bad_data = remove_bad_data
# remove bad data, is there is any
- if self._remove_bad_data:
+ if remove_bad_data:
x, y = self._remove_bad_data(x, y, bad_data)
# check acceptable size and dimensions
Modified: branches/Interpolate1D/setup.py
===================================================================
--- branches/Interpolate1D/setup.py 2008-07-29 06:10:46 UTC (rev 4575)
+++ branches/Interpolate1D/setup.py 2008-07-29 14:11:52 UTC (rev 4576)
@@ -16,14 +16,14 @@
depends = ['interpolate.h'])
# used by dfitpack extension
- config.add_library('fitpack',
+ config.add_library('_fitpack',
sources=[join('fitpack', '*.f')],
)
# Fortran routines (collectively "FITPACK" for spline interpolation)
- config.add_extension('dfitpack',
+ config.add_extension('_dfitpack',
sources=['fitpack.pyf'],
- libraries=['fitpack'],
+ libraries=['_fitpack'],
)
# FIXME : add documentation files
More information about the Scipy-svn
mailing list