Beispiel #1
0
 def __init__(self, x, y, w=None, bbox=[None, None], k=3,
              xname=None, xunits=None, yname=None, yunits=None):
     """Constructor.
     """
     xUnivariateSplineBase.__init__(self, x, y, xname, xunits, yname, yunits)
     _x = numpy.log10(x)
     _y = numpy.log10(y)
     UnivariateSpline.__init__(self, _x, _y, w, bbox, k, s=None)
     self.__integral_spline = None
Beispiel #2
0
    def __init__(self, x, y, *args, **kwargs):
        try:
            _UnivariateSpline.__init__(self, x, y, *args, **kwargs)
        except ValueError as e:
            if str(e) == "x must be strictly increasing":
                warnings.warn("Spline: ValueError catched, monotonizing!")

                mono_x, mono_y = self._monotonize(x, y)
                _UnivariateSpline.__init__(self, mono_x, mono_y, *args,
                                           **kwargs)
            else:
                raise e

        self.xdata = sp.array(x)
        self.ydata = sp.array(y)
Beispiel #3
0
 def __init__(self,
              x,
              y,
              w=None,
              bbox=[None, None],
              k=3,
              s=None,
              xname=None,
              xunits=None,
              yname=None,
              yunits=None):
     """Constructor.
     """
     xUnivariateSplineBase.__init__(self, x, y, xname, xunits, yname,
                                    yunits)
     UnivariateSpline.__init__(self, self.x, self.y, w, bbox, k, s)
Beispiel #4
0
 def __init__(self,
              x,
              y,
              w=None,
              bbox=[None, None],
              k=3,
              xname=None,
              xunits=None,
              yname=None,
              yunits=None):
     """Constructor.
     """
     xUnivariateSplineBase.__init__(self, x, y, xname, xunits, yname,
                                    yunits)
     _x = numpy.log10(x)
     _y = numpy.log10(y)
     UnivariateSpline.__init__(self, _x, _y, w, bbox, k, s=None)
     self.__integral_spline = None
Beispiel #5
0
 def __init__(self, x, y, fill_value=0.0, **kwargs):
     self.bnds = [x[0], x[-1]]
     self.fill_value = fill_value
     UnivariateSpline.__init__(self, x, y, **kwargs)
Beispiel #6
0
 def __init__(self, x, y, w=None, bbox=[None, None], k=3, s=None,
              xname=None, xunits=None, yname=None, yunits=None):
     """Constructor.
     """
     xUnivariateSplineBase.__init__(self, x, y, xname, xunits, yname, yunits)
     UnivariateSpline.__init__(self, self.x, self.y, w, bbox, k, s)
Beispiel #7
0
 def __init__(self, x, y, fill_value=0.0, **kwargs):
     self.bnds = [x[0], x[-1]]
     self.fill_value = fill_value
     UnivariateSpline.__init__(self, x, y, **kwargs)
Beispiel #8
0
    def __init__(self, x, y, *args, **kwargs):
        UnivariateSpline.__init__(self, x, y, *args, **kwargs)

        self.xdata = sp.array(x)
        self.ydata = sp.array(y)