[Scipy-svn] r2874 - in trunk/Lib/sandbox/pyloess: . src tests

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Mar 27 02:39:04 EDT 2007


Author: pierregm
Date: 2007-03-27 01:38:36 -0500 (Tue, 27 Mar 2007)
New Revision: 2874

Added:
   trunk/Lib/sandbox/pyloess/examples.py
   trunk/Lib/sandbox/pyloess/mpyloess.py
   trunk/Lib/sandbox/pyloess/src/_mloess.c
   trunk/Lib/sandbox/pyloess/src/_mloess.pyx
   trunk/Lib/sandbox/pyloess/tests/test_mpyloess.py
Modified:
   trunk/Lib/sandbox/pyloess/pyloess.py
   trunk/Lib/sandbox/pyloess/setup.py
   trunk/Lib/sandbox/pyloess/src/_loess.c
   trunk/Lib/sandbox/pyloess/src/_loess.pyx
   trunk/Lib/sandbox/pyloess/src/c_python.pxd
   trunk/Lib/sandbox/pyloess/tests/test_pyloess.py
Log:
pyloess    : lowess now an object w/ inputs/parameters/outputs, to match loess
pyloess    : in lowess, renamed the f parameter to 'span' for readability
_loess.pyx : Fixed a bug w/ model.degree
_loess.pyx : Forced inputs to float_
mpyloess/_mloess.pyx : Add loess support for masked array

Added: trunk/Lib/sandbox/pyloess/examples.py
===================================================================
--- trunk/Lib/sandbox/pyloess/examples.py	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/examples.py	2007-03-27 06:38:36 UTC (rev 2874)
@@ -0,0 +1,63 @@
+"""
+Wrapper to lowess and stl routines.
+
+:author: Pierre GF Gerard-Marchant
+:contact: pierregm_at_uga_edu
+:date: $Date$
+:version: $Id$
+"""
+__author__ = "Pierre GF Gerard-Marchant ($Author$)"
+__version__ = '1.0'
+__revision__ = "$Revision$"
+__date__     = '$Date$'
+
+
+import os
+
+import numpy
+from numpy import fromiter
+from numpy import bool_, float_
+
+#import maskedarray as MA
+
+import pyloess
+from pyloess import loess
+
+com_example = [
+"""               
+# Get some example data ...................................
+dfile = open(os.path.join('tests','madeup_data'), 'r')
+dfile.readline()
+x = fromiter((float(v) for v in dfile.readline().rstrip().split()),
+             float_).reshape(-1,2)
+dfile.readline()
+y = fromiter((float(v) for v in dfile.readline().rstrip().split()),
+             float_)
+""",
+
+"""
+# Get some additional info for prediction .................
+newdata1 = numpy.array([[-2.5, 0.0, 2.5], [0., 0., 0.]])
+newdata2 = numpy.array([[-0.5, 0.5], [0., 0.]])
+""",
+
+"""
+# Create a new loess object ...............................
+madeup = loess(x,y)
+# ... and prints the parameters
+print madeup.model,'\\n', madeup.control
+""",
+
+"""
+# Modify some of the model parameters .....................
+madeup.model.update(span=0.8, normalize=False)
+print madeup.model
+"""
+]
+
+        
+
+if 1:
+    for com in com_example:
+        print com
+        exec(com)


Property changes on: trunk/Lib/sandbox/pyloess/examples.py
___________________________________________________________________
Name: svn:keywords
   + Date 
Author 
Revision
Id

Added: trunk/Lib/sandbox/pyloess/mpyloess.py
===================================================================
--- trunk/Lib/sandbox/pyloess/mpyloess.py	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/mpyloess.py	2007-03-27 06:38:36 UTC (rev 2874)
@@ -0,0 +1,843 @@
+# pylint: disable-msg=E1101
+"""
+Wrapper to lowess, loess and stl routines, with support for masked arrays.
+
+LOWESS:
+Initial Fortran code available at:
+http://netlib.bell-labs.com/netlib/go/lowess.f.gz
+
+initial author: W. S. Cleveland, 1979.
+Simple to double precision conversion of the Fortran code by Pierre
+Gerard-Marchant, 2007/03.
+
+STL:
+Initial Fortran code available at:
+http://netlib.bell-labs.com/netlib/a/stl.gz
+Initial Authors: R. B. Cleveland, W. S. Cleveland, J. E. McRae, and
+I. Terpenning, 1990.
+Simple-to-double precision conversion of the Fortran code by Pierre 
+Gerard-Marchant, 2007/03.
+
+LOESS:
+Initial C/Fortran package avialable at
+http://netlib.bell-labs.com/netlib/a/dloess.gz
+Initial authors: W. S. Cleveland, E. Grosse and Shyu
+Adaptation to Pyrex/Python by Pierre Gerard-Marchant, 2007/03
+
+:author: Pierre GF Gerard-Marchant
+:contact: pierregm_at_uga_edu
+:date: $Date$
+:version: $Id$
+"""
+__author__ = "Pierre GF Gerard-Marchant ($Author$)"
+__version__ = '1.0'
+__revision__ = "$Revision$"
+__date__     = '$Date$'
+
+import numpy
+from numpy import bool_, complex_, float_, int_, str_, object_
+import numpy.core.numeric as numeric
+from numpy.core.records import recarray
+narray = numeric.array
+nempty = numeric.empty
+nlogical_not = numpy.logical_not
+
+import maskedarray.core
+from maskedarray.core import masked, nomask, mask_or
+from maskedarray.core import masked_array as marray
+
+import _lowess, _stl, _mloess
+
+
+#####---------------------------------------------------------------------------
+#--- --- STL ---
+#####---------------------------------------------------------------------------
+class lowess:
+    """An object for robust locally weighted regression.
+    
+:IVariables:
+    inputs : 
+    parameters :
+    outputs : 
+
+
+Method
+------
+    The fitted values are computed by using the nearest neighbor
+    routine  and  robust locally weighted regression of degree 1
+    with the tricube weight function.  A few additional features
+    have  been  added.  Suppose r is FN truncated to an integer.
+    Let  h  be  the  distance  to  the  r-th  nearest   neighbor
+    from X[i].   All  points within h of X[i] are used.  Thus if
+    the r-th nearest neighbor is exactly the  same  distance  as
+    other  points,  more  than r points can possibly be used for
+    the smooth at  X[i].   There  are  two  cases  where  robust
+    locally  weighted regression of degree 0 is actually used at
+    X[i].  One case occurs when  h  is  0.0.   The  second  case
+    occurs  when  the  weighted  standard error of the X[i] with
+    respect to the weights w[j] is  less  than  .001  times  the
+    range  of the X[i], where w[j] is the weight assigned to the
+    j-th point of X (the tricube  weight  times  the  robustness
+    weight)  divided by the sum of all of the weights.  Finally,
+    if the w[j] are all zero for the smooth at X[i], the  fitted
+    value is taken to be Y[i].    
+
+References
+----------
+    W. S. Cleveland. 1978. Visual and Computational Considerations in
+    Smoothing Scatterplots by Locally Weighted Regression. In
+    Computer Science and Statistics: Eleventh Annual Symposium on the
+    Interface, pages 96-100. Institute of Statistics, North Carolina
+    State University, Raleigh, North Carolina, 1978.
+
+    W. S. Cleveland, 1979. Robust Locally Weighted Regression and
+    Smoothing Scatterplots. Journal of the American Statistical
+    Association, 74:829-836, 1979.
+
+    W. S. Cleveland, 1981. LOWESS: A Program for Smoothing Scatterplots
+    by Robust Locally Weighted Regression. The American Statistician,
+    35:54.  
+    """
+    #............................................
+    class _inputs(object):
+        """Inputs of the lowess fit.
+        
+:IVariables:
+    x : ndarray
+        A (n,) float ndarray of observations (sorted by increasing values).
+    y : ndarray
+        A (n,) float ndarray of responses (sorted by increasing x).
+        
+        """
+        def __init__(self, x, y):
+            x = marray(x, copy=False, subok=True, dtype=float_, order='F').ravel()
+            y = marray(y, copy=False, subok=True, dtype=float_, order='F').ravel()
+            if x.size != y.size:
+                msg = "Incompatible size between observations (%s) and response (%s)!" 
+                raise ValueError(msg % (x.size, y.size))
+            idx = x.argsort()
+            self._x = x[idx]
+            self._y = y[idx]
+            self._mask = mask_or(self._x._mask, self._y._mask, 
+                                 copy=False, small_mask=False)
+        #.....
+        x = property(fget=lambda self:self._x)
+        y = property(fget=lambda self:self._y)
+    #............................................     
+    class _parameters(object):
+        """Parameters of the lowess fit.
+        
+:IVariables:
+    span : float *[0.5]*
+        Fraction of the total number of points used to compute each fitted value.
+        As f increases the smoothed values become smoother. Choosing f in the range
+        .2 to .8 usually results in a good fit.
+    nsteps : integer *[2]*
+        Number of iterations in the robust fit. If nsteps=0, the nonrobust fit
+        is returned; setting nsteps=2 should serve most purposes.
+    delta : integer *[0]*
+        Nonnegative parameter which may be used to save computations.
+        If N (the number of observations) is less than 100, set delta=0.0;
+        if N is greater than 100 you should find out how delta works by reading
+        the additional instructions section.
+        """
+        def __init__(self, span, nsteps, delta, caller):
+            self.activated = False
+            self._span = span
+            self._nsteps = nsteps
+            self._delta = delta
+            self._caller = caller
+        #.....
+        def _get_span(self):
+            "Gets the current span."
+            return self._span
+        def _set_span(self, span):
+            "Sets the current span, and refit if needed."
+            if span <= 0 or span > 1:
+                raise ValueError("span should be between zero and one!")
+            self._span = span
+            if self.activated:
+                self._caller.fit()
+        span = property(fget=_get_span, fset=_set_span)
+        #.....
+        def _get_nsteps(self):
+            "Gets the current number of iterations."
+            return self._nsteps
+        def _set_nsteps(self, nsteps):
+            "Sets the current number of iterations, and refit if needed."
+            if nsteps < 0:
+                raise ValueError("nsteps should be positive!")
+            self._nsteps = nsteps
+            if self.activated:
+                self._caller.fit()
+        nsteps = property(fget=_get_nsteps, fset=_set_nsteps)
+        #.....
+        def _get_delta(self):
+            "Gets the current delta."
+            return self._delta
+        def _set_delta(self, delta):
+            "Sets the current delta, and refit if needed."
+            if delta < 0:
+                raise ValueError("delta should be positive!")
+            self._delta = delta
+            if self.activated:
+                self._caller.fit()
+        delta = property(fget=_get_delta, fset=_set_delta)     
+    #............................................
+    class _outputs(object):
+        """Outputs of the lowess fit.
+
+:IVariables:
+    fitted_values : ndarray
+        A (n,) ndarray of fitted values (readonly).
+    fitted_residuals : ndarray
+        A (n,) ndarray of residuals (readonly).
+    weights : ndarray
+        A (n,) ndarray of robust weights (readonly).
+        """
+        def __init__(self, n):
+            self._fval = marray(nempty((n,), dtype=float_, order='F'))
+            self._rw = marray(nempty((n,), dtype=float_, order='F'))
+            self._fres = marray(nempty((n,), dtype=float_, order='F'))
+        #.....
+        fitted_values = property(fget=lambda self:self._fval)
+        robust_weights = property(fget=lambda self:self._rw)
+        fitted_residuals = property(fget=lambda self:self._fres)        
+    #............................................
+    def __init__(self, x, y, span=0.5, nsteps=2, delta=0):
+        """
+:Parameters:
+    x : ndarray
+        Abscissas of the points on the scatterplot; the values in X must be
+        ordered from smallest to largest.
+    y : ndarray
+        Ordinates of the points on the scatterplot.
+    span : Float *[0.5]*
+        Fraction of the total number of points used to compute each fitted value.
+        As span increases the smoothed values become smoother. Choosing span in 
+        the range .2 to .8 usually results in a good fit.
+    nsteps : Integer *[2]*
+        Number of iterations in the robust fit. If nsteps=0, the nonrobust fit
+        is returned; setting nsteps=2 should serve most purposes.
+    delta : Integer *[0]*
+        Nonnegative parameter which may be used to save computations.
+        If N (the number of elements in x) is less than 100, set delta=0.0;
+        if N is greater than 100 you should find out how delta works by reading
+        the additional instructions section.
+        """
+        # Chek the input data .........
+        # Initialize the attributes ...
+        self.inputs = lowess._inputs(x,y)
+        self.parameters = lowess._parameters(span, nsteps, delta, self)
+        self.outputs = self._outputs(self.inputs._x.size)
+        # Force a fit .................
+        self.fit()
+        
+    #............................................
+    def fit(self):
+        # Check the mask .........
+        mask = self.inputs._mask
+        if mask.any():
+            unmask = nlogical_not(mask) 
+            (x, y) = (self.inputs._x[unmask], self.inputs._y[unmask])
+        else:
+            unmask = slice(None,None)
+            (x, y) = (self.inputs._x, self.inputs._y)
+        # Get the parameters .....
+        self.parameters.activated = True
+        f = self.parameters._span
+        nsteps = self.parameters._nsteps
+        delta = self.parameters._delta
+        (tmp_s, tmp_w, tmp_r) = _lowess.lowess(x, y, f, nsteps, delta)
+        # Process the outputs .....
+        #... set the values
+        self.outputs._fval[unmask] = tmp_s[:]
+        self.outputs._rw[unmask] = tmp_w[:]
+        self.outputs._fres[unmask] = tmp_r[:]
+        #... set the masks
+        self.outputs._fval._set_mask(mask)
+        self.outputs._rw._set_mask(mask)
+        self.outputs._fres._set_mask(mask)
+        # Clean up the mess .......
+        del(tmp_s, tmp_w, tmp_r)
+        return self.outputs
+
+#####---------------------------------------------------------------------------
+#--- --- STL ---
+#####---------------------------------------------------------------------------
+class stl:
+    class _inputs:
+        def __init__(self, y):
+            self.y = marray(y, subok=True, copy=False).ravel()
+            self._mask = self.y._mask
+            if self._mask.any():
+                raise ValueError("Masked arrays should be filled first!")
+            self.y_eff = self.y.compressed()
+    #............................................     
+    class _model(object):
+        """Model parameters of the STL fit.
+
+:IVariables:        
+    np : Integer *[12]*
+        Period of the seasonal component.
+        For example, if  the  time series is monthly with a yearly cycle, then
+        np=12.
+    ns : Integer *[7]*
+        Length of the seasonal smoother.
+        The value of  ns should be an odd integer greater than or equal to 3.
+        A value ns>6 is recommended. As ns  increases  the  values  of  the
+        seasonal component at a given point in the seasonal cycle (e.g., January
+        values of a monthly series with  a  yearly cycle) become smoother.
+    nt : Integer *[None]*
+        Length of the trend smoother.
+        The  value  of  nt should be an odd integer greater than or equal to 3.
+        A value of nt between 1.5*np and 2*np is  recommended. As nt increases,
+        the values of the trend component become  smoother.
+        If nt is None, it is estimated as the smallest odd integer greater
+        or equal to (1.5*np)/[1-(1.5/ns)]
+    nl : Integer *[None]*
+        Length of the low-pass filter.
+        The value of nl should  be an odd integer greater than or equal to 3.
+        The smallest odd integer greater than or equal to np is used by default.
+    isdeg : Integer *[1]*
+        Degree of locally-fitted polynomial in seasonal smoothing.
+        The value is 0 or 1.
+    itdeg : Integer *[1]*
+        Degree of locally-fitted polynomial in trend smoothing.
+        The value is 0 or 1.
+    ildeg : Integer *[1]*
+        Degree of locally-fitted polynomial in low-pass smoothing.
+        The value is 0 or 1.
+        """
+        def __init__(self, 
+                     np=12, ns=7, nt=None, nl=13, 
+                     isdeg=1, itdeg=1, ildeg=1, caller=None):
+            self._np = np
+            self._ns = ns
+            #
+            self._nt = nt
+            if nt is None:
+                self._nt = max(int((1.5*np/(1.-1.5/ns))+0.5), 3)
+            else:
+                self._nt = nt
+            if not self._nt % 2:
+                self._nt += 1
+            #
+            if nl is None:
+                self._nl = max(np, 3)
+            else:
+                self._nl = nl
+            if not self._nl % 2:
+                self._nl += 1
+            #
+            self._isdeg = isdeg
+            self._itdeg = itdeg
+            self._ildeg = ildeg
+            self.activated = False
+            self.caller = caller
+        #.....
+        def _get_np(self):
+            "Gets the current seasonal period."
+            return self._np
+        def _set_np(self, np):
+            "Sets the current seasonal period."
+            self._np = max(np,2)
+            if self.activated: 
+                self.caller.fit()
+        np = property(fget=_get_np, fset=_set_np)
+        #.....
+        def _get_ns(self):
+            "Gets the length of the seasonal smoother."
+            return self._ns
+        def _set_ns(self, ns):
+            "Sets the length of the seasonal smoother."
+            self._ns = max(ns, 3)
+            if self._ns %2 == 0:
+                self._ns += 1            
+            if self.activated: 
+                self.caller.fit()
+        ns = property(fget=_get_ns, fset=_set_ns)
+        #.....
+        def _get_nt(self):
+            "Gets the length of the trend smoother."
+            return self._nt
+        def _set_nt(self, nt):
+            "Sets the length of the trend smoother."
+            self._nt = nt
+            if self.activated: 
+                self.caller.fit()
+        nt = property(fget=_get_nt, fset=_set_nt)
+        #.....
+        def _get_nl(self):
+            "Gets the length of the trend smoother."
+            return self._nl
+        def _set_nl(self, nl):
+            "Sets the length of the trend smoother."
+            self._nl = nl
+            if self.activated: 
+                self.caller.fit()
+        nl = property(fget=_get_nl, fset=_set_nl)
+        #.....
+        def _get_isdeg(self):
+            "Gets the degree of the seasonal smoother."
+            return self._isdeg
+        def _set_isdeg(self, isdeg):
+            "Sets the degree of the seasonal smoother."
+            if isdeg > 2 or isdeg < 0:
+                raise ValueError("The degree of the seasonal smoother should be 1 or 0.")
+            self._isdeg = int(isdeg)
+            if self.activated: 
+                self.caller.fit()
+        isdeg = property(fget=_get_isdeg, fset=_set_isdeg)
+        #.....
+        def _get_itdeg(self):
+            "Gets the degree of the trend smoother."
+            return self._itdeg
+        def _set_itdeg(self, itdeg):
+            "Sets the degree of the trend smoother."
+            if itdeg > 2 or itdeg < 0:
+                raise ValueError("The degree of the trend smoother should be 1 or 0.")
+            self._itdeg = int(itdeg)
+            if self.activated: 
+                self.caller.fit()
+        itdeg = property(fget=_get_itdeg, fset=_set_itdeg)
+        #.....
+        def _get_ildeg(self):
+            "Gets the degree of the low-pass smoother."
+            return self._ildeg
+        def _set_ildeg(self, ildeg):
+            "Sets the degree of the low-pass smoother."
+            if ildeg > 2 or ildeg < 0:
+                raise ValueError("The degree of the low-pass smoother should be 1 or 0.")
+            self._ildeg = int(ildeg)
+            if self.activated: 
+                self.caller.fit()
+        ildeg = property(fget=_get_ildeg, fset=_set_ildeg)
+            
+    #............................................     
+    class _control(object):
+        """Control parameters of the STL fit.
+        
+:IVariables:        
+    nsjump : Integer *[None]*
+        Skipping value for seasonal smoothing.
+        The seasonal smoother skips ahead nsjump points and then linearly
+        interpolates in between.  The value  of nsjump should be a positive
+        integer; if nsjump=1, a seasonal smooth is calculated at all n points.
+        To make the procedure run faster, a reasonable choice for nsjump is
+        10%-20% of ns. By default, nsjump= 0.1*ns.
+    ntjump : Integer *[1]*
+        Skipping value for trend smoothing. If None, ntjump= 0.1*nt
+    nljump : Integer *[1]*
+        Skipping value for low-pass smoothing. If None, nljump= 0.1*nl
+    robust : Boolean *[True]*
+        Flag indicating whether robust fitting should be performed.
+    ni : Integer *[None]*
+        Number of loops for updating the seasonal and trend  components.
+        The value of ni should be a positive integer.
+        See the next argument for advice on the  choice of ni.
+        If ni is None, ni is set to 1 for robust fitting, to 5 otherwise.
+    no : Integer *[0]*
+        Number of iterations of robust fitting. The value of no should
+        be a nonnegative integer. If the data are well behaved without
+        outliers, then robustness iterations are not needed. In this case
+        set no=0, and set ni=2 to 5 depending on how much security
+        you want that  the seasonal-trend looping converges.
+        If outliers are present then no=3 is a very secure value unless
+        the outliers are radical, in which case no=5 or even 10 might
+        be better.  If no>0 then set ni to 1 or 2.
+        If None, then no is set to 15 for robust fitting, to 0 otherwise.
+        """
+        def __init__(self, 
+                     nsjump=None,ntjump=None,nljump=None, 
+                     robust=True, ni=None,no=None, caller=None):
+            (self._nsjump, self._ntjump, self._nljump) = (nsjump, ntjump, nljump)
+            #...
+            if robust:
+                if ni is None:
+                    ni = 1
+                if no is None:
+                    no = 15
+            else:
+                if ni is None:
+                    ni = 5
+                if no is None:
+                    no = 0
+            (self._robust, self._ni, self._no) = (robust, ni, no)
+            #...
+            self.activated = False
+            self.caller = caller
+        #....
+        def _get_nsjump(self):
+            "Gets the skipping value for seasonal smoothing."
+            return self._nsjump
+        def _set_nsjump(self, nsjump):
+            "Sets the skipping value for seasonal smoothing."
+            self._nsjump = nsjump
+            if self.activated:
+                self.caller.fit()
+        nsjump = property(fget=_get_nsjump, fset=_set_nsjump)
+        #....
+        def _get_ntjump(self):
+            "Gets the skipping value for trend smoothing."
+            return self._ntjump
+        def _set_ntjump(self, ntjump):
+            "Sets the skipping value for trend smoothing."
+            self._ntjump = ntjump
+            if self.activated:
+                self.caller.fit()
+        ntjump = property(fget=_get_ntjump, fset=_set_ntjump)
+        #....
+        def _get_nljump(self):
+            "Gets the skipping value for low-pass smoothing."
+            return self._nljump
+        def _set_nljump(self, nljump):
+            "Set  the skipping value for low-pass smoothings"
+            self._nljump = nljump
+            if self.activated:
+                self.caller.fit()
+        nljump = property(fget=_get_nljump, fset=_set_nljump)
+        #....
+        def _get_robust(self):
+            "Gets whether robust fitting should be performed."
+            return self._robust
+        def _set_robust(self, robust):
+            "Sets whether robust fitting should be performed."
+            self._robust = robust
+            if self.activated:
+                self.caller.fit()
+        robust = property(fget=_get_robust, fset=_set_robust)
+        #....
+        def _get_ni(self):
+            "Gets the number of loops."
+            return self._ni
+        def _set_ni(self, ni):
+            "Sets the number of loops."
+            if ni < 0:
+                raise ValueError("The number of loops should be positive!")
+            self._ni = ni
+            if self.activated:
+                self.caller.fit()
+        ni = property(fget=_get_ni, fset=_set_ni)
+        #....
+        def _get_no(self):
+            "Gets the number of iterations for robust fitting."
+            return self._no
+        def _set_no(self, no):
+            "Sets the number of iterations for robust fitting."
+            if no < 0 :
+                raise ValueError("The number of iterations should be positive!")
+            self._no = no
+            if self.activated:
+                self.caller.fit()
+        no = property(fget=_get_no, fset=_set_no)
+    #............................................     
+    class _outputs(object):
+        """Outputs of the STL fit.
+        
+:IVariables:
+    seasonal : ndarray
+        Seasonal fitted values.
+    trend : ndarray
+        Trend fitted values.
+    residuals : ndarray
+        Fitted residuals.
+    weights : ndarray
+        Local robust weights. The final local robust weights are all 1 if no=0.
+        """
+        def __init__(self, n):
+            self._seasonal = marray(nempty((n,), float_))
+            self._trend = marray(nempty((n,), float_))
+            self._weights = marray(nempty((n,), float_))
+            self._residuals = marray(nempty((n,), float_))
+        #.....
+        seasonal = property(fget=lambda self:self._seasonal)
+        trend = property(fget=lambda self:self._trend)
+        weights = property(fget=lambda self:self._weights)
+        residuals = property(fget=lambda self:self._residuals)
+    #.............................................
+    def __init__(self, y, **options):
+        """Decomposes a time series into seasonal and trend  components.
+
+:Parameters:
+    y : ndarray
+        Time series to be decomposed.
+    np : Integer *[12]*
+        Period of the seasonal component.
+        For example, if  the  time series is monthly with a yearly cycle, then
+        np=12.
+    ns : Integer *[7]*
+        Length of the seasonal smoother.
+        The value of  ns should be an odd integer greater than or equal to 3.
+        A value ns>6 is recommended. As ns  increases  the  values  of  the
+        seasonal component at a given point in the seasonal cycle (e.g., January
+        values of a monthly series with  a  yearly cycle) become smoother.
+    nt : Integer *[None]*
+        Length of the trend smoother.
+        The  value  of  nt should be an odd integer greater than or equal to 3.
+        A value of nt between 1.5*np and 2*np is  recommended. As nt increases,
+        the values of the trend component become  smoother.
+        If nt is None, it is estimated as the smallest odd integer greater
+        or equal to (1.5*np)/[1-(1.5/ns)]
+    nl : Integer *[None]*
+        Length of the low-pass filter.
+        The value of nl should  be an odd integer greater than or equal to 3.
+        The smallest odd integer greater than or equal to np is used by default.
+    isdeg : Integer *[1]*
+        Degree of locally-fitted polynomial in seasonal smoothing.
+        The value is 0 or 1.
+    itdeg : Integer *[1]*
+        Degree of locally-fitted polynomial in trend smoothing.
+        The value is 0 or 1.
+    ildeg : Integer *[1]*
+        Degree of locally-fitted polynomial in low-pass smoothing.
+        The value is 0 or 1.
+    nsjump : Integer *[None]*
+        Skipping value for seasonal smoothing.
+        The seasonal smoother skips ahead nsjump points and then linearly
+        interpolates in between.  The value  of nsjump should be a positive
+        integer; if nsjump=1, a seasonal smooth is calculated at all n points.
+        To make the procedure run faster, a reasonable choice for nsjump is
+        10%-20% of ns. By default, nsjump= 0.1*ns.
+    ntjump : Integer *[1]*
+        Skipping value for trend smoothing. If None, ntjump= 0.1*nt
+    nljump : Integer *[1]*
+        Skipping value for low-pass smoothing. If None, nljump= 0.1*nl
+    robust : Boolean *[True]*
+        Flag indicating whether robust fitting should be performed.
+    ni : Integer *[None]*
+        Number of loops for updating the seasonal and trend  components.
+        The value of ni should be a positive integer.
+        See the next argument for advice on the  choice of ni.
+        If ni is None, ni is set to 1 for robust fitting, to 5 otherwise.
+    no : Integer *[0]*
+        Number of iterations of robust fitting. The value of no should
+        be a nonnegative integer. If the data are well behaved without
+        outliers, then robustness iterations are not needed. In this case
+        set no=0, and set ni=2 to 5 depending on how much security
+        you want that  the seasonal-trend looping converges.
+        If outliers are present then no=3 is a very secure value unless
+        the outliers are radical, in which case no=5 or even 10 might
+        be better.  If no>0 then set ni to 1 or 2.
+        If None, then no is set to 15 for robust fitting, to 0 otherwise.
+        """
+        self.inputs = stl._inputs(y)
+        self.model = stl._model(**dict(np=options.get('np',12),
+                                       ns=options.get('ns',7),
+                                       nt=options.get('nt',None),
+                                       nl=options.get('nl',13),
+                                       isdeg=options.get('isdeg',1),
+                                       itdeg=options.get('itdeg',1),
+                                       ildeg=options.get('ildeg',1),
+                                       caller=self))
+        optcontrol = dict(
+                     nsjump=options.get('nsjump',int(0.1*self.model.ns+0.9)),
+                     ntjump=options.get('ntjump',int(0.1*self.model.nt+0.9)),
+                     nljump=options.get('nljump',int(0.1*self.model.nl+0.9)),
+                     robust=options.get('robust',True),
+                     ni=options.get('ni',None),
+                     no=options.get('no',None),)
+        self.control = stl._control(**optcontrol)
+        self.outputs = stl._outputs(len(self.inputs.y))
+        # Force a fit .................
+        self.fit()
+        
+    #............................................
+    def fit(self):
+        # Get the input ...............
+        y = self.inputs.y_eff
+        mask = self.inputs._mask
+        if mask is nomask:
+            unmask = slice(None,None)
+        else:
+            unmask = nlogical_not(mask)
+        # Get the parameters ..........
+        model = self.model
+        (np, ns, nt, nl) = (model.np, model.ns, model.nt, model.nl)
+        (isdeg, itdeg, ildeg) = (model.isdeg, model.itdeg, model.ildeg)
+        control = self.control
+        (nsjump, ntjump, nljump) = (control.nsjump, control.ntjump, control.nljump)
+        (ni, no) = (control.ni, control.no)
+        # Compute the fit .............
+        (rw,szn,trn,work) = _stl.stl(y,np,ns,nt,nl,isdeg,itdeg,ildeg,
+                                     nsjump,ntjump,nljump,ni,no,)
+        # Process the outputs .....
+        #... set the values
+        self.outputs.trend[unmask] = trn.flat
+        self.outputs.seasonal[unmask] = szn.flat
+        self.outputs.weights[unmask] = rw.flat
+        self.outputs.residuals[unmask] = (y-trn-szn)
+        #... set the masks
+        self.outputs.trend._set_mask(mask)
+        self.outputs.seasonal._set_mask(mask)
+        self.outputs.weights._set_mask(mask)
+        self.outputs.residuals._set_mask(mask)
+        # Clean up the mess .......
+        self.model.activated = self.control.activated = True
+        del(trn, rw, szn)
+        return self.outputs
+        
+   
+
+
+
+def fstl(y, np=12, ns=7, nt=None, nl=13, isdeg=1, itdeg=1, ildeg=1,
+        nsjump=None,ntjump=None,nljump=None, robust=True, ni=None,no=None):
+    """Decomposes a time series into seasonal and trend  components.
+
+:Parameters:
+    y : Numerical array
+        Time Series to be decomposed.
+    np : Integer *[12]*
+        Period of the seasonal component.
+        For example, if  the  time series is monthly with a yearly cycle, then
+        np=12.
+    ns : Integer *[7]*
+        Length of the seasonal smoother.
+        The value of  ns should be an odd integer greater than or equal to 3.
+        A value ns>6 is recommended. As ns  increases  the  values  of  the
+        seasonal component at a given point in the seasonal cycle (e.g., January
+        values of a monthly series with  a  yearly cycle) become smoother.
+    nt : Integer *[None]*
+        Length of the trend smoother.
+        The  value  of  nt should be an odd integer greater than or equal to 3.
+        A value of nt between 1.5*np and 2*np is  recommended. As nt increases,
+        the values of the trend component become  smoother.
+        If nt is None, it is estimated as the smallest odd integer greater
+        or equal to (1.5*np)/[1-(1.5/ns)]
+    nl : Integer *[None]*
+        Length of the low-pass filter.
+        The value of nl should  be an odd integer greater than or equal to 3.
+        The smallest odd integer greater than or equal to np is used by default.
+    isdeg : Integer *[1]*
+        Degree of locally-fitted polynomial in seasonal smoothing.
+        The value is 0 or 1.
+    itdeg : Integer *[1]*
+        Degree of locally-fitted polynomial in trend smoothing.
+        The value is 0 or 1.
+    ildeg : Integer *[1]*
+        Degree of locally-fitted polynomial in low-pass smoothing.
+        The value is 0 or 1.
+    nsjump : Integer *[None]*
+        Skipping value for seasonal smoothing.
+        The seasonal smoother skips ahead nsjump points and then linearly
+        interpolates in between.  The value  of nsjump should be a positive
+        integer; if nsjump=1, a seasonal smooth is calculated at all n points.
+        To make the procedure run faster, a reasonable choice for nsjump is
+        10%-20% of ns. By default, nsjump= 0.1*ns.
+    ntjump : Integer *[1]*
+        Skipping value for trend smoothing. If None, ntjump= 0.1*nt
+    nljump : Integer *[1]*
+        Skipping value for low-pass smoothing. If None, nljump= 0.1*nl
+    robust : Boolean *[True]*
+        Flag indicating whether robust fitting should be performed.
+    ni : Integer *[None]*
+        Number of loops for updating the seasonal and trend  components.
+        The value of ni should be a positive integer.
+        See the next argument for advice on the  choice of ni.
+        If ni is None, ni is set to 1 for robust fitting, to 5 otherwise.
+    no : Integer *[0]*
+        Number of iterations of robust fitting. The value of no should
+        be a nonnegative integer. If the data are well behaved without
+        outliers, then robustness iterations are not needed. In this case
+        set no=0, and set ni=2 to 5 depending on how much security
+        you want that  the seasonal-trend looping converges.
+        If outliers are present then no=3 is a very secure value unless
+        the outliers are radical, in which case no=5 or even 10 might
+        be better.  If no>0 then set ni to 1 or 2.
+        If None, then no is set to 15 for robust fitting, to 0 otherwise.
+
+Returns:
+    A recarray of estimated trend values ('trend'), estimated seasonal
+    components ('seasonal'), local robust weights ('weights') and fit
+    residuals ('residuals').
+    The final local robust weights are all 1 if no=0.
+
+Reference
+---------
+
+    R. B. Cleveland, W. S. Cleveland, J. E. McRae and I. Terpenning.
+    1990. STL: A Seasonal-Trend Decomposition Procedure Based on LOESS
+    (with Discussion). Journal of Official Statistics, 6:3-73.
+
+
+    """
+    ns = max(ns, 3)
+    if ns % 2 == 0:
+        ns += 1
+    np = max(2, np)
+    if nt is None:
+        nt = max(int((1.5*np/(1.-1.5/ns))+0.5), 3)
+        if not nt % 2:
+            nt += 1
+    if nl is None:
+        nl = max(3,np)
+        if not nl % 2:
+            nl += 1
+    if nsjump is None:
+        nsjump = int(0.1*ns + 0.9)
+    if ntjump is None:
+        ntjump = int(0.1*nt + 0.9)
+    if nljump is None:
+        nljump = int(0.1*nl + 0.9)
+    if robust:
+        if ni is None:
+            ni = 1
+        if no is None:
+            no = 15
+    else:
+        if ni is None:
+            ni = 5
+        if no is None:
+            no = 0
+
+    if hasattr(y,'_mask') and numpy.any(y._mask):
+        raise ValueError,"Missing values should first be filled !"
+    y = numeric.array(y, subok=True, copy=False).ravel()
+    (rw,szn,trn,work) = _stl.stl(y,np,ns,nt,nl,isdeg,itdeg,ildeg,
+                                 nsjump,ntjump,nljump,ni,no,)
+    dtyp = [('trend', float_), ('seasonal', float_),
+            ('residuals', float_), ('weights', float_)]
+    result = numeric.fromiter(zip(trn,szn,y-trn-szn,rw), dtype=dtyp)
+    return result.view(recarray)
+
+#####---------------------------------------------------------------------------
+#--- --- Loess ---
+#####---------------------------------------------------------------------------
+loess = _mloess.loess
+loess_anova = _mloess.anova
+
+################################################################################
+if __name__ == '__main__':
+    from maskedarray.testutils import assert_almost_equal
+    from maskedarray import masked_values
+    from numpy import fromiter
+    import os
+    
+    if 1:
+        NOx = marray([4.818, 2.849, 3.275, 4.691, 4.255, 5.064, 2.118, 4.602,
+                      2.286, 0.970, 3.965, 5.344, 3.834, 1.990, 5.199, 5.283,
+                      -9999, -9999, 3.752, 0.537, 1.640, 5.055, 4.937, 1.561])
+        NOx = maskedarray.masked_values(NOx, -9999)
+        E = marray([0.831, 1.045, 1.021, 0.970, 0.825, 0.891, 0.71, 0.801,
+                    1.074, 1.148, 1.000, 0.928, 0.767, 0.701, 0.807, 0.902,
+                    -9999, -9999, 0.997, 1.224, 1.089, 0.973, 0.980, 0.665])
+        gas_fit_E = numpy.array([0.665, 0.949, 1.224])
+        newdata = numpy.array([0.6650000, 0.7581667, 0.8513333, 0.9445000,
+                               1.0376667, 1.1308333, 1.2240000])
+        coverage = 0.99
+
+        rfile = open(os.path.join('tests','gas_result'), 'r')
+        results = []
+        for i in range(8):
+            rfile.readline()
+            z = fromiter((float(v) for v in rfile.readline().rstrip().split()),
+                         float_)
+            results.append(z)   
+        #
+        gas = loess(E,NOx)
+        gas.model.span = 2./3.
+        gas.fit()
+        assert_almost_equal(gas.outputs.fitted_values.compressed(), results[0], 6)
+        assert_almost_equal(gas.outputs.enp, 5.5, 1)
+        assert_almost_equal(gas.outputs.s, 0.3404, 4) 
\ No newline at end of file


Property changes on: trunk/Lib/sandbox/pyloess/mpyloess.py
___________________________________________________________________
Name: svn:keywords
   + Date 
Author 
Revision
Id

Modified: trunk/Lib/sandbox/pyloess/pyloess.py
===================================================================
--- trunk/Lib/sandbox/pyloess/pyloess.py	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/pyloess.py	2007-03-27 06:38:36 UTC (rev 2874)
@@ -39,13 +39,16 @@
 import numpy.core.numeric as numeric
 from numpy.core.records import recarray
 
+from numpy.core import array as narray
+from numpy.core import empty as nempty
+
 import _lowess, _stl, _loess
 
 
 #####---------------------------------------------------------------------------
 #--- --- STL ---
 #####---------------------------------------------------------------------------
-def lowess(x,y,f=0.5,nsteps=2,delta=0):
+def flowess(x,y,span=0.5,nsteps=2,delta=0):
     """Performs a robust locally weighted regression (lowess).
 
     Outputs a *3xN* array of fitted values, residuals and fit weights.
@@ -57,7 +60,7 @@
         ordered from smallest to largest.
     y : ndarray
         Ordinates of the points on the scatterplot.
-    f : Float *[0.5]*
+    span : Float *[0.5]*
         Fraction of the total number of points used to compute each fitted value.
         As f increases the smoothed values become smoother. Choosing f in the range
         .2 to .8 usually results in a good fit.
@@ -145,10 +148,224 @@
     35:54.
 
     """
-    dtyp = [('smooth',float_), ('weigths', float_), ('residuals', float_)]
-    return numeric.fromiter(zip(*_lowess.lowess(x,y,f,nsteps,delta,)),
-                            dtype=dtyp).view(recarray)
+    x = narray(x, copy=False, subok=True, dtype=float_)
+    y = narray(y, copy=False, subok=True, dtype=float_)
+    if x.size != y.size:
+        raise ValueError("Incompatible size between observations and response!")
+    
+    
+    out_dtype = [('smooth',float_), ('weigths', float_), ('residuals', float_)]
+    return numeric.fromiter(zip(*_lowess.lowess(x,y,span,nsteps,delta,)),
+                            dtype=out_dtype).view(recarray)
 
+
+class lowess:
+    """An object for robust locally weighted regression.
+    
+:IVariables:
+    inputs : An object storing the inputs.
+        x : A (n,) ndarray of observations (sorted by increasing values).
+        y : A (n,) ndarray of responses (sorted by increasing x).
+    parameters : An object storing the control parameters.
+        span : Fraction of the total number of points used in the smooth.
+        nsteps : Number of iterations of the robust fit.
+        delta : Parameter used to save computation time
+    outputs : An object storing the outputs.
+        smooth : A (n,) ndarray of fitted values.
+        residuals : A (n,) ndarray of fitted residuals.
+        weights : A (n,) ndarray of robust weights.
+        
+
+Method
+------
+    The fitted values are computed by using the nearest neighbor
+    routine  and  robust locally weighted regression of degree 1
+    with the tricube weight function.  A few additional features
+    have  been  added.  Suppose r is FN truncated to an integer.
+    Let  h  be  the  distance  to  the  r-th  nearest   neighbor
+    from X[i].   All  points within h of X[i] are used.  Thus if
+    the r-th nearest neighbor is exactly the  same  distance  as
+    other  points,  more  than r points can possibly be used for
+    the smooth at  X[i].   There  are  two  cases  where  robust
+    locally  weighted regression of degree 0 is actually used at
+    X[i].  One case occurs when  h  is  0.0.   The  second  case
+    occurs  when  the  weighted  standard error of the X[i] with
+    respect to the weights w[j] is  less  than  .001  times  the
+    range  of the X[i], where w[j] is the weight assigned to the
+    j-th point of X (the tricube  weight  times  the  robustness
+    weight)  divided by the sum of all of the weights.  Finally,
+    if the w[j] are all zero for the smooth at X[i], the  fitted
+    value is taken to be Y[i].    
+
+References
+----------
+    W. S. Cleveland. 1978. Visual and Computational Considerations in
+    Smoothing Scatterplots by Locally Weighted Regression. In
+    Computer Science and Statistics: Eleventh Annual Symposium on the
+    Interface, pages 96-100. Institute of Statistics, North Carolina
+    State University, Raleigh, North Carolina, 1978.
+
+    W. S. Cleveland, 1979. Robust Locally Weighted Regression and
+    Smoothing Scatterplots. Journal of the American Statistical
+    Association, 74:829-836, 1979.
+
+    W. S. Cleveland, 1981. LOWESS: A Program for Smoothing Scatterplots
+    by Robust Locally Weighted Regression. The American Statistician,
+    35:54.  
+    """
+    #............................................
+    class _inputs(object):
+        """Inputs of the lowess fit.
+        
+:IVariables:
+    x : ndarray
+        A (n,) float ndarray of observations (sorted by increasing values).
+    y : ndarray
+        A (n,) float ndarray of responses (sorted by increasing x).
+        """
+        def __init__(self, x, y):
+            x = narray(x, copy=False, subok=True, dtype=float_).ravel()
+            y = narray(y, copy=False, subok=True, dtype=float_).ravel()
+            if x.size != y.size:
+                msg = "Incompatible size between observations (%s) and response (%s)!" 
+                raise ValueError(msg % (x.size, y.size))
+            idx = x.argsort()
+            self._x = x[idx]
+            self._y = y[idx]
+        #.....
+        x = property(fget=lambda self:self._x)
+        y = property(fget=lambda self:self._y)
+    #............................................     
+    class _parameters(object):
+        """Parameters of the lowess fit.
+        
+:IVariables:
+    span : float *[0.5]*
+        Fraction of the total number of points used to compute each fitted value.
+        As f increases the smoothed values become smoother. Choosing f in the range
+        .2 to .8 usually results in a good fit.
+    nsteps : integer *[2]*
+        Number of iterations in the robust fit. If nsteps=0, the nonrobust fit
+        is returned; setting nsteps=2 should serve most purposes.
+    delta : integer *[0]*
+        Nonnegative parameter which may be used to save computations.
+        If N (the number of observations) is less than 100, set delta=0.0;
+        if N is greater than 100 you should find out how delta works by reading
+        the additional instructions section.
+        """
+        def __init__(self, span, nsteps, delta, caller):
+            self.activated = False
+            self._span = span
+            self._nsteps = nsteps
+            self._delta = delta
+            self._caller = caller
+        #.....
+        def _get_span(self):
+            "Gets the current span."
+            return self._span
+        def _set_span(self, span):
+            "Sets the current span, and refit if needed."
+            if span <= 0 or span > 1:
+                raise ValueError("span should be between zero and one!")
+            self._span = span
+            if self.activated:
+                self._caller.fit()
+        span = property(fget=_get_span, fset=_set_span)
+        #.....
+        def _get_nsteps(self):
+            "Gets the current number of iterations."
+            return self._nsteps
+        def _set_nsteps(self, nsteps):
+            "Sets the current number of iterations, and refit if needed."
+            if nsteps < 0:
+                raise ValueError("nsteps should be positive!")
+            self._nsteps = nsteps
+            if self.activated:
+                self._caller.fit()
+        nsteps = property(fget=_get_nsteps, fset=_set_nsteps)
+        #.....
+        def _get_delta(self):
+            "Gets the current delta."
+            return self._delta
+        def _set_delta(self, delta):
+            "Sets the current delta, and refit if needed."
+            if delta < 0:
+                raise ValueError("delta should be positive!")
+            self._delta = delta
+            if self.activated:
+                self._caller.fit()
+        delta = property(fget=_get_delta, fset=_set_delta)     
+    #............................................
+    class _outputs(object):
+        """Outputs of the lowess fit.
+
+:IVariables:
+    fitted_values : ndarray
+        A (n,) ndarray of fitted values (readonly).
+    fitted_residuals : ndarray
+        A (n,) ndarray of residuals (readonly).
+    weights : ndarray
+        A (n,) ndarray of robust weights (readonly).
+        """
+        def __init__(self, n):
+            self._fval = nempty((n,), float_)
+            self._rw = nempty((n,), float_)
+            self._fres = nempty((n,), float_)
+        #.....
+        fitted_values = property(fget=lambda self:self._fval)
+        robust_weights = property(fget=lambda self:self._rw)
+        fitted_residuals = property(fget=lambda self:self._fres)
+        
+    #............................................
+    def __init__(self, x, y, span=0.5, nsteps=2, delta=0):
+        """
+:Parameters:
+    x : ndarray
+        Abscissas of the points on the scatterplot; the values in X must be
+        ordered from smallest to largest.
+    y : ndarray
+        Ordinates of the points on the scatterplot.
+    span : Float *[0.5]*
+        Fraction of the total number of points used to compute each fitted value.
+        As span increases the smoothed values become smoother. Choosing span in 
+        the range .2 to .8 usually results in a good fit.
+    nsteps : Integer *[2]*
+        Number of iterations in the robust fit. If nsteps=0, the nonrobust fit
+        is returned; setting nsteps=2 should serve most purposes.
+    delta : Integer *[0]*
+        Nonnegative parameter which may be used to save computations.
+        If N (the number of elements in x) is less than 100, set delta=0.0;
+        if N is greater than 100 you should find out how delta works by reading
+        the additional instructions section.
+        """
+        # Chek the input data .........
+        # Initialize the attributes ...
+        self.inputs = lowess._inputs(x,y)
+        self.parameters = lowess._parameters(span, nsteps, delta, self)
+        self.outputs = lowess._outputs(self.inputs._x.size)
+        # Force a fit .................
+        self.fit()
+        
+    #............................................
+    def fit(self):
+        """Computes the lowess fit. Returns a lowess.outputs object."""
+        (x, y) = (self.inputs._x, self.inputs._y)
+        # Get the parameters .....
+        self.parameters.activated = True
+        f = self.parameters._span
+        nsteps = self.parameters._nsteps
+        delta = self.parameters._delta
+        (tmp_s, tmp_w, tmp_r) = _lowess.lowess(x, y, f, nsteps, delta)
+        # Process the outputs .....
+        #... set the values
+        self.outputs.fitted_values[:] = tmp_s.flat
+        self.outputs.robust_weights[:] = tmp_w.flat
+        self.outputs.fitted_residuals[:] = tmp_r.flat
+        # Clean up the mess .......
+        del(tmp_s, tmp_w, tmp_r)
+        return self.outputs
+
+
 #####---------------------------------------------------------------------------
 #--- --- STL ---
 #####---------------------------------------------------------------------------
@@ -393,3 +610,9 @@
 """
 
 loess_anova = _loess.anova
+
+################################################################################
+if __name__ == '__main__':
+    from maskedarray.testutils import assert_almost_equal
+    from maskedarray import masked_values
+    

Modified: trunk/Lib/sandbox/pyloess/setup.py
===================================================================
--- trunk/Lib/sandbox/pyloess/setup.py	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/setup.py	2007-03-27 06:38:36 UTC (rev 2874)
@@ -29,15 +29,25 @@
     build_info = {}
     dict_append(build_info, **blas_info)
     dict_append(build_info, libraries=['floess'])    
-    c_sources = ['_loess.c', 'loess.c', 'loessc.c', 'misc.c', 'predict.c',]
+    c_sources = ['loess.c', 'loessc.c', 'misc.c', 'predict.c',]
     confgr.add_extension('_loess',
-                         sources=[join('src', x) for x in c_sources],
+                         sources=[join('src','_loess.c')] + \
+                                 [join('src', x) for x in c_sources],
                          depends = [join('src','*.h'),
                                     join('src','*.pyx'),
                                     join('src','*.pxd')
                                     ],
                          **build_info
                         )
+    confgr.add_extension('_mloess',
+                         sources=[join('src','_mloess.c')] + \
+                                 [join('src', x) for x in c_sources],
+                         depends = [join('src','*.h'),
+                                    join('src','*.pyx'),
+                                    join('src','*.pxd')
+                                    ],
+                         **build_info
+                        )
     confgr.add_data_dir('tests')
     return confgr
 

Modified: trunk/Lib/sandbox/pyloess/src/_loess.c
===================================================================
--- trunk/Lib/sandbox/pyloess/src/_loess.c	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/src/_loess.c	2007-03-27 06:38:36 UTC (rev 2874)
@@ -1,4 +1,4 @@
-/* Generated by Pyrex 0.9.5.1a on Wed Mar 21 17:37:22 2007 */
+/* Generated by Pyrex 0.9.5.1a on Sun Mar 25 18:15:15 2007 */
 
 #include "Python.h"
 #include "structmember.h"
@@ -71,6 +71,14 @@
 struct __pyx_obj_6_loess_loess_inputs {
   PyObject_HEAD
   loess_inputs (*_base);
+  PyArrayObject *w_ndr;
+  PyArrayObject *x;
+  PyArrayObject *y;
+  PyArrayObject *masked;
+  PyArrayObject *x_eff;
+  PyArrayObject *y_eff;
+  int nobs;
+  int npar;
 };
 
 
@@ -101,13 +109,19 @@
 
 struct __pyx_obj_6_loess_loess_outputs {
   PyObject_HEAD
+  struct __pyx_vtabstruct_6_loess_loess_outputs *__pyx_vtab;
   loess_outputs (*_base);
   long nobs;
   long npar;
   int activated;
 };
 
+struct __pyx_vtabstruct_6_loess_loess_outputs {
+  PyObject *((*setup)(struct __pyx_obj_6_loess_loess_outputs *,loess_outputs (*),long ,long ));
+};
+static struct __pyx_vtabstruct_6_loess_loess_outputs *__pyx_vtabptr_6_loess_loess_outputs;
 
+
 struct __pyx_obj_6_loess_conf_intervals {
   PyObject_HEAD
   struct __pyx_vtabstruct_6_loess_conf_intervals *__pyx_vtab;
@@ -146,8 +160,6 @@
   struct __pyx_obj_6_loess_loess_kd_tree *kd_tree;
   struct __pyx_obj_6_loess_loess_outputs *outputs;
   struct __pyx_obj_6_loess_loess_predicted *predicted;
-  long nobs;
-  long npar;
 };
 
 
@@ -168,9 +180,9 @@
 static PyTypeObject *__pyx_ptype_6_loess_loess_predicted = 0;
 static PyTypeObject *__pyx_ptype_6_loess_loess = 0;
 static PyTypeObject *__pyx_ptype_6_loess_anova = 0;
-static PyObject *__pyx_k32;
-static PyObject *__pyx_k33;
-static PyObject *__pyx_k34;
+static PyObject *__pyx_k9;
+static PyObject *__pyx_k10;
+static PyObject *__pyx_k11;
 static PyObject *(__pyx_f_6_loess_floatarray_from_data(int ,int ,double (*))); /*proto*/
 static PyObject *(__pyx_f_6_loess_boolarray_from_data(int ,int ,int (*))); /*proto*/
 
@@ -178,40 +190,18 @@
 /* Implementation of _loess */
 
 static char (__pyx_k1[]) = "A (n,) ndarray of weights to be given to individual observations in the \n        sum of squared residuals that forms the local fitting criterion. If not\n        None, the weights should be non negative. If the different observations\n        have non-equal variances, the weights should be inversely proportional \n        to the variances.\n        By default, an unweighted fit is carried out (all the weights are one).\n        ";
-static char (__pyx_k2[]) = "Number of observations.";
-static char (__pyx_k3[]) = "Number of independent variables.";
-static char (__pyx_k4[]) = "\n    surface : string [\"interpolate\"]\n        Determines whether the fitted surface is computed directly at all points\n        (\"direct\") or whether an interpolation method is used (\"interpolate\").\n        The default (\"interpolate\") is what most users should use unless special \n        circumstances warrant.\n        ";
-static char (__pyx_k5[]) = "\n    statistics : string [\"approximate\"]\n        Determines whether the statistical quantities are computed exactly \n        (\"exact\") or approximately (\"approximate\"). \"exact\" should only be used \n        for testing the approximation in statistical development and is not meant \n        for routine usage because computation time can be horrendous.\n        ";
-static char (__pyx_k6[]) = "\n    trace_hat : string [\"wait.to.decide\"]\n        Determines how the trace of the hat matrix should be computed. The hat\n        matrix is used in the computation of the statistical quantities. \n        If \"exact\", an exact computation is done; this could be slow when the\n        number of observations n becomes large. If \"wait.to.decide\" is selected, \n        then a default is \"exact\" for n < 500 and \"approximate\" otherwise. \n        This option is only useful when the fitted surface is interpolated. If  \n        surface is \"exact\", an exact computation is always done for the trace. \n        Setting trace_hat to \"approximate\" for large dataset will substantially \n        reduce the computation time.\n        ";
-static char (__pyx_k7[]) = "\n    iterations : integer\n        Number of iterations of the robust fitting method. If the family is \n        \"gaussian\", the number of iterations is set to 0.\n        ";
-static char (__pyx_k8[]) = "\n    cell : integer\n        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),\n        where n is the number of observations, and span the smoothing parameter.\n        Then, a cell is further divided if the number of observations within it \n        is greater than or equal to k. This option is only used if the surface \n        is interpolated.\n        ";
-static char (__pyx_k9[]) = "\n    normalize : boolean [True]\n        Determines whether the independent variables should be normalized.  \n        If True, the normalization is performed by setting the 10% trimmed \n        standard deviation to one. If False, no normalization is carried out. \n        This option is only useful for more than one variable. For spatial\n        coordinates predictors or variables with a common scale, it should be \n        set to False.\n        ";
-static char (__pyx_k10[]) = "Smoothing factor, as a fraction of the number of points to take into\n    account. By default, span=0.75.";
-static char (__pyx_k11[]) = "\n    degree : integer [2]\n        Overall degree of locally-fitted polynomial. 1 is locally-linear \n        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.\n        ";
-static char (__pyx_k12[]) = "\n    family : string [\"gaussian\"]\n        Determines the assumed distribution of the errors. The values are \n        \"gaussian\" or \"symmetric\". If \"gaussian\" is selected, the fit is \n        performed with least-squares. If \"symmetric\" is selected, the fit\n        is performed robustly by redescending M-estimators.\n        ";
-static char (__pyx_k13[]) = "\n    parametric_flags : sequence [ [False]*p ]\n        Indicates which independent variables should be conditionally-parametric\n       (if there are two or more independent variables). The argument should \n       be a sequence of booleans, with the same size as the number of independent \n       variables, specified in the order of the predictor group ordered in x. \n        ";
-static char (__pyx_k14[]) = "\n    drop_square : sequence [ [False]* p]\n        When there are two or more independent variables and when a 2nd order\n        polynomial is used, \"drop_square_flags\" specifies those numeric predictors \n        whose squares should be dropped from the set of fitting variables. \n        The method of specification is the same as for parametric.  \n        ";
-static char (__pyx_k15[]) = "\n    fitted_values : ndarray\n        The (n,) ndarray of fitted values.\n        ";
-static char (__pyx_k16[]) = "\n    fitted_residuals : ndarray\n        The (n,) ndarray of fitted residuals (observations - fitted values).\n        ";
-static char (__pyx_k17[]) = "\n    pseudovalues : ndarray\n        The (n,) ndarray of adjusted values of the response when robust estimation \n        is used.\n        ";
-static char (__pyx_k18[]) = "\n    diagonal :\n        Diagonal of the operator hat matrix.\n        ";
-static char (__pyx_k19[]) = "\n    robust : ndarray\n        The (n,) ndarray of robustness weights for robust fitting.\n        ";
-static char (__pyx_k20[]) = "Equivalent number of parameters.";
-static char (__pyx_k21[]) = "\n    enp : float\n        Equivalent number of parameters.\n        ";
-static char (__pyx_k22[]) = "\n    s : float\n        Estimate of the scale of residuals.\n        ";
-static char (__pyx_k23[]) = "\n    one_delta: float\n        Statistical parameter used in the computation of standard errors.\n        ";
-static char (__pyx_k24[]) = "\n    two_delta : float\n        Statistical parameter used in the computation of standard errors.\n       ";
-static char (__pyx_k25[]) = "\n    trace_hat : float    \n        Trace of the operator hat matrix.\n        ";
-static char (__pyx_k26[]) = "\n    values : ndarray\n        The (m,) ndarray of loess values evaluated at newdata\n        ";
-static char (__pyx_k27[]) = "\n    stderr : ndarray\n        The (m,) ndarray of the estimates of the standard error on the estimated\n        values.\n        ";
-static char (__pyx_k28[]) = "\n    residual_scale : float\n        Estimate of the scale of the residuals\n        ";
-static char (__pyx_k29[]) = "\n    df : integer\n        Degrees of freedom of the t-distribution used to compute pointwise \n        confidence intervals for the evaluated surface.\n        ";
-static char (__pyx_k31[]) = "\n:Keywords:\n    x : ndarray\n        A (n,p) ndarray of independent variables, with n the number of observations\n        and p the number of variables.\n    y : ndarray\n        A (n,) ndarray of observations\n    weights : ndarray\n        A (n,) ndarray of weights to be given to individual observations in the \n        sum of squared residuals that forms the local fitting criterion. If not\n        None, the weights should be non negative. If the different observations\n        have non-equal variances, the weights should be inversely proportional \n        to the variances.\n        By default, an unweighted fit is carried out (all the weights are one).\n    surface : string [\"interpolate\"]\n        Determines whether the fitted surface is computed directly at all points\n        (\"direct\") or whether an interpolation method is used (\"interpolate\").\n        The default (\"interpolate\") is what most users should use unless special \n        circumstances warrant.\n    statistics : string [\"approximate\"]\n        Determines whether the statistical quantities are computed exactly \n        (\"exact\") or approximately (\"approximate\"). \"exact\" should only be used \n        for testing the approximation in statistical development and is not meant \n        for routine usage because computation time can be horrendous.\n    trace_hat : string [\"wait.to.decide\"]\n        Determines how the trace of the hat matrix should be computed. The hat\n        matrix is used in the computation of the statistical quantities. \n        If \"exact\", an exact computation is done; this could be slow when the\n        number of observations n becomes large. If \"wait.to.decide\" is selected, \n        then a default is \"exact\" for n < 500 and \"approximate\" otherwise. \n        This option is only useful when the fitted surface is interpolated. If  \n        surface is \"exact\", an exact computation is always done for the trace. \n        Setting trace_hat to \"approximate\" for large dataset will substantially \n        reduce the computation time.\n    iterations : integer\n        Number of iterations of the robust fitting method. If the family is \n        \"gaussian\", the number of iterations is set to 0.\n    cell : integer\n        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),\n        where n is the number of observations, and span the smoothing parameter.\n        Then, a cell is further divided if the number of observations within it \n        is greater than or equal to k. This option is only used if the surface \n        is interpolated.\n    span : float [0.75]\n        Smoothing factor, as a fraction of the number of points to take into\n        account. \n    degree : integer [2]\n        Overall degree of locally-fitted polynomial. 1 is locally-linear \n        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.\n    normalize : boolean [True]\n        Determines whether the independent variables should be normalized.  \n        If True, the normalization is performed by setting the 10% trimmed \n        standard deviation to one. If False, no normalization is carried out. \n        This option is only useful for more than one variable. For spatial\n        coordinates predictors or variables with a common scale, it should be \n        set to False.\n    family : string [\"gaussian\"]\n        Determines the assumed distribution of the errors. The values are \n        \"gaussian\" or \"symmetric\". If \"gaussian\" is selected, the fit is \n        performed with least-squares. If \"symmetric\" is selected, the fit\n        is performed robustly by redescending M-estimators.\n    parametric_flags : sequence [ [False]*p ]\n        Indicates which independent variables should be conditionally-parametric\n       (if there are two or more independent variables). The argument should \n       be a sequence of booleans, with the same size as the number of independent \n       variables, specified in the order of the predictor group ordered in x. \n    drop_square : sequence [ [False]* p]\n        When there are two or more independent variables and when a 2nd order\n        polynomial is used, \"drop_square_flags\" specifies those numeric predictors \n        whose squares should be dropped from the set of fitting variables. \n        The method of specification is the same as for parametric.  \n        \n:Outputs:\n    fitted_values : ndarray\n        The (n,) ndarray of fitted values.\n    fitted_residuals : ndarray\n        The (n,) ndarray of fitted residuals (observations - fitted values).\n    enp : float\n        Equivalent number of parameters.\n    s : float\n        Estimate of the scale of residuals.\n    one_delta: float\n        Statistical parameter used in the computation of standard errors.\n    two_delta : float\n        Statistical parameter used in the computation of standard errors.\n    pseudovalues : ndarray\n        The (n,) ndarray of adjusted values of the response when robust estimation \n        is used.\n    trace_hat : float    \n        Trace of the operator hat matrix.\n    diagonal :\n        Diagonal of the operator hat matrix.\n    robust : ndarray\n        The (n,) ndarray of robustness weights for robust fitting.\n    divisor : ndarray\n        The (p,) array of normalization divisors for numeric predictors.\n        \n\n    newdata : ndarray\n        The (m,p) array of independent variables where the surface must be estimated.\n    values : ndarray\n        The (m,) ndarray of loess values evaluated at newdata\n    stderr : ndarray\n        The (m,) ndarray of the estimates of the standard error on the estimated\n        values.\n    residual_scale : float\n        Estimate of the scale of the residuals\n    df : integer\n        Degrees of freedom of the t-distribution used to compute pointwise \n        confidence intervals for the evaluated surface.\n    nest : integer\n        Number of new observations.\n       \n        \n";
+static char (__pyx_k2[]) = "\n    surface : string [\"interpolate\"]\n        Determines whether the fitted surface is computed directly at all points\n        (\"direct\") or whether an interpolation method is used (\"interpolate\").\n        The default (\"interpolate\") is what most users should use unless special \n        circumstances warrant.\n        ";
+static char (__pyx_k3[]) = "\n    statistics : string [\"approximate\"]\n        Determines whether the statistical quantities are computed exactly \n        (\"exact\") or approximately (\"approximate\"). \"exact\" should only be used \n        for testing the approximation in statistical development and is not meant \n        for routine usage because computation time can be horrendous.\n        ";
+static char (__pyx_k4[]) = "\n    trace_hat : string [\"wait.to.decide\"]\n        Determines how the trace of the hat matrix should be computed. The hat\n        matrix is used in the computation of the statistical quantities. \n        If \"exact\", an exact computation is done; this could be slow when the\n        number of observations n becomes large. If \"wait.to.decide\" is selected, \n        then a default is \"exact\" for n < 500 and \"approximate\" otherwise. \n        This option is only useful when the fitted surface is interpolated. If  \n        surface is \"exact\", an exact computation is always done for the trace. \n        Setting trace_hat to \"approximate\" for large dataset will substantially \n        reduce the computation time.\n        ";
+static char (__pyx_k5[]) = "\n    iterations : integer\n        Number of iterations of the robust fitting method. If the family is \n        \"gaussian\", the number of iterations is set to 0.\n        ";
+static char (__pyx_k6[]) = "\n    cell : integer\n        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),\n        where n is the number of observations, and span the smoothing parameter.\n        Then, a cell is further divided if the number of observations within it \n        is greater than or equal to k. This option is only used if the surface \n        is interpolated.\n        ";
+static char (__pyx_k8[]) = "\n        \n\n    newdata : ndarray\n        The (m,p) array of independent variables where the surface must be estimated.\n    values : ndarray\n        The (m,) ndarray of loess values evaluated at newdata\n    stderr : ndarray\n        The (m,) ndarray of the estimates of the standard error on the estimated\n        values.\n    residual_scale : float\n        Estimate of the scale of the residuals\n    df : integer\n        Degrees of freedom of the t-distribution used to compute pointwise \n        confidence intervals for the evaluated surface.\n    nest : integer\n        Number of new observations.\n       \n        \n";
 
 static PyObject *__pyx_n_c_python;
 static PyObject *__pyx_n_c_numpy;
 static PyObject *__pyx_n_numpy;
 static PyObject *__pyx_n_narray;
+static PyObject *__pyx_n_float_;
 static PyObject *__pyx_n_c_loess;
 static PyObject *__pyx_n_array;
 static PyObject *__pyx_n_False;
@@ -228,36 +218,36 @@
   PyObject *__pyx_4 = 0;
   __pyx_v_a_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":19 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":20 */
   __pyx_v_size = (__pyx_v_rows * __pyx_v_cols);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":20 */
-  __pyx_1 = PyArray_SimpleNewFromData(1,(&__pyx_v_size),NPY_DOUBLE,__pyx_v_data); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":21 */
+  __pyx_1 = PyArray_SimpleNewFromData(1,(&__pyx_v_size),NPY_DOUBLE,__pyx_v_data); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; goto __pyx_L1;}
   Py_INCREF(((PyObject *)__pyx_1));
   Py_DECREF(((PyObject *)__pyx_v_a_ndr));
   __pyx_v_a_ndr = ((PyArrayObject *)((PyObject *)__pyx_1));
   Py_DECREF(__pyx_1); __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":21 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":22 */
   __pyx_2 = (__pyx_v_cols > 1);
   if (__pyx_2) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":22 */
-    __pyx_1 = PyInt_FromLong(__pyx_v_rows); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
-    __pyx_3 = PyInt_FromLong(__pyx_v_cols); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
-    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":23 */
+    __pyx_1 = PyInt_FromLong(__pyx_v_rows); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
+    __pyx_3 = PyInt_FromLong(__pyx_v_cols); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
     PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
     PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
     __pyx_1 = 0;
     __pyx_3 = 0;
-    if (PyObject_SetAttr(((PyObject *)__pyx_v_a_ndr), __pyx_n_shape, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
+    if (PyObject_SetAttr(((PyObject *)__pyx_v_a_ndr), __pyx_n_shape, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
     Py_DECREF(__pyx_4); __pyx_4 = 0;
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":23 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":24 */
   Py_INCREF(((PyObject *)__pyx_v_a_ndr));
   __pyx_r = ((PyObject *)__pyx_v_a_ndr);
   goto __pyx_L0;
@@ -288,44 +278,44 @@
   PyObject *__pyx_4 = 0;
   __pyx_v_a_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":28 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":29 */
   __pyx_v_size = (__pyx_v_rows * __pyx_v_cols);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":29 */
-  __pyx_1 = PyArray_SimpleNewFromData(1,(&__pyx_v_size),NPY_DOUBLE,__pyx_v_data); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":30 */
+  __pyx_1 = PyArray_SimpleNewFromData(1,(&__pyx_v_size),NPY_DOUBLE,__pyx_v_data); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
   Py_INCREF(((PyObject *)__pyx_1));
   Py_DECREF(((PyObject *)__pyx_v_a_ndr));
   __pyx_v_a_ndr = ((PyArrayObject *)((PyObject *)__pyx_1));
   Py_DECREF(__pyx_1); __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":30 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":31 */
   __pyx_2 = (__pyx_v_cols > 1);
   if (__pyx_2) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":31 */
-    __pyx_1 = PyInt_FromLong(__pyx_v_rows); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
-    __pyx_3 = PyInt_FromLong(__pyx_v_cols); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
-    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":32 */
+    __pyx_1 = PyInt_FromLong(__pyx_v_rows); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
+    __pyx_3 = PyInt_FromLong(__pyx_v_cols); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
     PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
     PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
     __pyx_1 = 0;
     __pyx_3 = 0;
-    if (PyObject_SetAttr(((PyObject *)__pyx_v_a_ndr), __pyx_n_shape, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
+    if (PyObject_SetAttr(((PyObject *)__pyx_v_a_ndr), __pyx_n_shape, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
     Py_DECREF(__pyx_4); __pyx_4 = 0;
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":32 */
-  __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_a_ndr), __pyx_n_astype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
-  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
-  __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_bool); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":33 */
+  __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_a_ndr), __pyx_n_astype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
+  __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_bool); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
   __pyx_4 = 0;
-  __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   __pyx_r = __pyx_4;
@@ -345,135 +335,299 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_f_6_loess_12loess_inputs_1x___get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_f_6_loess_12loess_inputs_1x___get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r;
-  PyObject *__pyx_1 = 0;
-  Py_INCREF(__pyx_v_self);
+static PyObject *__pyx_n_copy;
+static PyObject *__pyx_n_True;
+static PyObject *__pyx_n_subok;
+static PyObject *__pyx_n_dtype;
+static PyObject *__pyx_n_order;
+static PyObject *__pyx_n_C;
+static PyObject *__pyx_n_ndim;
+static PyObject *__pyx_n_ValueError;
+static PyObject *__pyx_n_len;
+static PyObject *__pyx_n_ravel;
+static PyObject *__pyx_n_ones;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":198 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->n,((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->p,((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->x); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; goto __pyx_L1;}
-  __pyx_r = __pyx_1;
-  __pyx_1 = 0;
-  goto __pyx_L0;
+static PyObject *__pyx_k22p;
 
-  __pyx_r = Py_None; Py_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1:;
-  Py_XDECREF(__pyx_1);
-  __Pyx_AddTraceback("_loess.loess_inputs.x.__get__");
-  __pyx_r = 0;
-  __pyx_L0:;
-  Py_DECREF(__pyx_v_self);
-  return __pyx_r;
-}
+static char (__pyx_k22[]) = "The array of indepedent varibales should be 2D at most!";
 
-static PyObject *__pyx_f_6_loess_12loess_inputs_1y___get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_f_6_loess_12loess_inputs_1y___get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r;
+static int __pyx_f_6_loess_12loess_inputs___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_f_6_loess_12loess_inputs___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_x_data = 0;
+  PyObject *__pyx_v_y_data = 0;
+  int __pyx_r;
   PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  int __pyx_5;
+  static char *__pyx_argnames[] = {"x_data","y_data",0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_x_data, &__pyx_v_y_data)) return -1;
   Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_x_data);
+  Py_INCREF(__pyx_v_y_data);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":202 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->n,1,((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->y); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
-  __pyx_r = __pyx_1;
-  __pyx_1 = 0;
-  goto __pyx_L0;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":89 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_x_data);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x_data);
+  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_float_); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_dtype, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  if (PyDict_SetItem(__pyx_3, __pyx_n_order, __pyx_n_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x));
+  ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x = ((PyArrayObject *)__pyx_4);
+  __pyx_4 = 0;
 
-  __pyx_r = Py_None; Py_INCREF(Py_None);
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":90 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_y_data);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_y_data);
+  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_float_); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_dtype, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  if (PyDict_SetItem(__pyx_3, __pyx_n_order, __pyx_n_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->y));
+  ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->y = ((PyArrayObject *)__pyx_4);
+  __pyx_4 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":92 */
+  __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x), __pyx_n_ndim); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  __pyx_5 = __pyx_5 == 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (__pyx_5) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":93 */
+    ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->npar = 1;
+    goto __pyx_L2;
+  }
+  __pyx_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x), __pyx_n_ndim); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;}
+  __pyx_4 = PyInt_FromLong(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_3, __pyx_4, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;}
+  __pyx_5 = __pyx_5 == 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  if (__pyx_5) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":95 */
+    __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x), __pyx_n_shape); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
+    __pyx_2 = PyInt_FromLong((-1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
+    __pyx_3 = PyObject_GetItem(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_5 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->npar = __pyx_5;
+    goto __pyx_L2;
+  }
+  /*else*/ {
+
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":97 */
+    __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    Py_INCREF(__pyx_k22p);
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k22p);
+    __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_Raise(__pyx_2, 0, 0);
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":98 */
+  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x));
+  PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x));
+  __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_5 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->nobs = __pyx_5;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":100 */
+  __pyx_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x), __pyx_n_ravel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x_eff));
+  ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->x_eff = ((PyArrayObject *)__pyx_3);
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":101 */
+  Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->y));
+  Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->y_eff));
+  ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->y_eff = ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->y;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":102 */
+  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_ones); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->nobs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
+  __pyx_3 = 0;
+  __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_float_); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_2, __pyx_n_dtype, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_3 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->w_ndr));
+  ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->w_ndr = ((PyArrayObject *)__pyx_3);
+  __pyx_3 = 0;
+
+  __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1:;
   Py_XDECREF(__pyx_1);
-  __Pyx_AddTraceback("_loess.loess_inputs.y.__get__");
-  __pyx_r = 0;
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_loess.loess_inputs.__init__");
+  __pyx_r = -1;
   __pyx_L0:;
   Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_x_data);
+  Py_DECREF(__pyx_v_y_data);
   return __pyx_r;
 }
 
 static PyObject *__pyx_f_6_loess_12loess_inputs_7weights___get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_f_6_loess_12loess_inputs_7weights___get__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r;
-  PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":213 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->n,1,((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->weights); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
-  __pyx_r = __pyx_1;
-  __pyx_1 = 0;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":114 */
+  Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->w_ndr));
+  __pyx_r = ((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->w_ndr);
   goto __pyx_L0;
 
   __pyx_r = Py_None; Py_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1:;
-  Py_XDECREF(__pyx_1);
-  __Pyx_AddTraceback("_loess.loess_inputs.weights.__get__");
-  __pyx_r = 0;
   __pyx_L0:;
   Py_DECREF(__pyx_v_self);
   return __pyx_r;
 }
 
-static PyObject *__pyx_n_ndim;
 static PyObject *__pyx_n_size;
-static PyObject *__pyx_n_ValueError;
 
-static PyObject *__pyx_k35p;
+static PyObject *__pyx_k26p;
 
-static char (__pyx_k35[]) = "Invalid size of the 'weights' vector!";
+static char (__pyx_k26[]) = "Invalid size of the 'weights' vector!";
 
 static int __pyx_f_6_loess_12loess_inputs_7weights___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_w); /*proto*/
 static int __pyx_f_6_loess_12loess_inputs_7weights___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_w) {
   PyArrayObject *__pyx_v_w_ndr;
   int __pyx_r;
   PyObject *__pyx_1 = 0;
-  int __pyx_2;
+  PyObject *__pyx_2 = 0;
   PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  int __pyx_5;
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_w);
   __pyx_v_w_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":218 */
-  __pyx_1 = PyArray_FROMANY(__pyx_v_w,NPY_DOUBLE,1,1,NPY_OWNDATA); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
-  Py_INCREF(((PyObject *)((PyArrayObject *)__pyx_1)));
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":119 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_w);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_w);
+  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; goto __pyx_L1;}
   Py_DECREF(((PyObject *)__pyx_v_w_ndr));
-  __pyx_v_w_ndr = ((PyArrayObject *)__pyx_1);
-  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_v_w_ndr = ((PyArrayObject *)__pyx_4);
+  __pyx_4 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":219 */
-  __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_w_ndr), __pyx_n_ndim); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;}
-  __pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_1, __pyx_3, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;}
-  __pyx_2 = __pyx_2 > 0;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":120 */
+  __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_w_ndr), __pyx_n_ndim); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;}
+  __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;}
+  __pyx_5 = __pyx_5 > 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  Py_DECREF(__pyx_3); __pyx_3 = 0;
-  if (!__pyx_2) {
-    __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_w_ndr), __pyx_n_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;}
-    __pyx_3 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->n); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;}
-    if (PyObject_Cmp(__pyx_1, __pyx_3, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;}
-    __pyx_2 = __pyx_2 != 0;
-    Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (!__pyx_5) {
+    __pyx_3 = PyObject_GetAttr(((PyObject *)__pyx_v_w_ndr), __pyx_n_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;}
+    __pyx_4 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->nobs); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;}
+    if (PyObject_Cmp(__pyx_3, __pyx_4, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; goto __pyx_L1;}
+    __pyx_5 = __pyx_5 != 0;
     Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
   }
-  if (__pyx_2) {
+  if (__pyx_5) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":220 */
-    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;}
-    __Pyx_Raise(__pyx_1, __pyx_k35p, 0);
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":121 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;}
+    __Pyx_Raise(__pyx_1, __pyx_k26p, 0);
     Py_DECREF(__pyx_1); __pyx_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":221 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":122 */
+  Py_INCREF(((PyObject *)__pyx_v_w_ndr));
+  Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->w_ndr));
+  ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->w_ndr = __pyx_v_w_ndr;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":123 */
   ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->weights = ((double (*))__pyx_v_w_ndr->data);
 
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1:;
   Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
   Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
   __Pyx_AddTraceback("_loess.loess_inputs.weights.__set__");
   __pyx_r = -1;
   __pyx_L0:;
@@ -483,60 +637,14 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_f_6_loess_12loess_inputs_4nobs___get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_f_6_loess_12loess_inputs_4nobs___get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r;
-  PyObject *__pyx_1 = 0;
-  Py_INCREF(__pyx_v_self);
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":226 */
-  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->n); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;}
-  __pyx_r = __pyx_1;
-  __pyx_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; Py_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1:;
-  Py_XDECREF(__pyx_1);
-  __Pyx_AddTraceback("_loess.loess_inputs.nobs.__get__");
-  __pyx_r = 0;
-  __pyx_L0:;
-  Py_DECREF(__pyx_v_self);
-  return __pyx_r;
-}
-
-static PyObject *__pyx_f_6_loess_12loess_inputs_4npar___get__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_f_6_loess_12loess_inputs_4npar___get__(PyObject *__pyx_v_self) {
-  PyObject *__pyx_r;
-  PyObject *__pyx_1 = 0;
-  Py_INCREF(__pyx_v_self);
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":231 */
-  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_inputs *)__pyx_v_self)->_base->p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;}
-  __pyx_r = __pyx_1;
-  __pyx_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; Py_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1:;
-  Py_XDECREF(__pyx_1);
-  __Pyx_AddTraceback("_loess.loess_inputs.npar.__get__");
-  __pyx_r = 0;
-  __pyx_L0:;
-  Py_DECREF(__pyx_v_self);
-  return __pyx_r;
-}
-
 static PyObject *__pyx_f_6_loess_13loess_control_7surface___get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_f_6_loess_13loess_control_7surface___get__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r;
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":248 */
-  __pyx_1 = PyString_FromString(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->surface); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":174 */
+  __pyx_1 = PyString_FromString(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->surface); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -556,11 +664,11 @@
 static PyObject *__pyx_n_interpolate;
 static PyObject *__pyx_n_direct;
 
-static PyObject *__pyx_k38p;
-static PyObject *__pyx_k39p;
+static PyObject *__pyx_k29p;
+static PyObject *__pyx_k30p;
 
-static char (__pyx_k38[]) = "Invalid value for the 'surface' argument: ";
-static char (__pyx_k39[]) = "should be in ('interpolate', 'direct').";
+static char (__pyx_k29[]) = "Invalid value for the 'surface' argument: ";
+static char (__pyx_k30[]) = "should be in ('interpolate', 'direct').";
 
 static int __pyx_f_6_loess_13loess_control_7surface___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_surface); /*proto*/
 static int __pyx_f_6_loess_13loess_control_7surface___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_surface) {
@@ -575,47 +683,47 @@
   Py_INCREF(__pyx_v_surface);
   __pyx_v_tmpx = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":250 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_surface, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;}
-  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":176 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_surface, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;}
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;}
   Py_INCREF(__pyx_n_interpolate);
   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_interpolate);
   Py_INCREF(__pyx_n_direct);
   PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_direct);
-  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; goto __pyx_L1;}
+  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; goto __pyx_L1;}
   __pyx_3 = !__pyx_3;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_3) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":251 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
-    __pyx_1 = PyNumber_Add(__pyx_k38p, __pyx_k39p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
-    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":177 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;}
+    __pyx_1 = PyNumber_Add(__pyx_k29p, __pyx_k30p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;}
     PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
     __pyx_1 = 0;
-    __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
+    __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_4); __pyx_4 = 0;
     __Pyx_Raise(__pyx_1, 0, 0);
     Py_DECREF(__pyx_1); __pyx_1 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":253 */
-  __pyx_2 = PyObject_GetAttr(__pyx_v_surface, __pyx_n_lower); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; goto __pyx_L1;}
-  __pyx_4 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":179 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_surface, __pyx_n_lower); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_tmpx);
   __pyx_v_tmpx = __pyx_4;
   __pyx_4 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":254 */
-  __pyx_5 = PyString_AsString(__pyx_v_tmpx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":180 */
+  __pyx_5 = PyString_AsString(__pyx_v_tmpx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; goto __pyx_L1;}
   ((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->surface = __pyx_5;
 
   __pyx_r = 0;
@@ -639,8 +747,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":265 */
-  __pyx_1 = PyString_FromString(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->statistics); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":191 */
+  __pyx_1 = PyString_FromString(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->statistics); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -659,9 +767,9 @@
 static PyObject *__pyx_n_approximate;
 static PyObject *__pyx_n_exact;
 
-static PyObject *__pyx_k42p;
+static PyObject *__pyx_k33p;
 
-static char (__pyx_k42[]) = "Invalid value for the 'statistics' argument: should be in ('approximate', 'exact').";
+static char (__pyx_k33[]) = "Invalid value for the 'statistics' argument: should be in ('approximate', 'exact').";
 
 static int __pyx_f_6_loess_13loess_control_10statistics___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_statistics); /*proto*/
 static int __pyx_f_6_loess_13loess_control_10statistics___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_statistics) {
@@ -676,46 +784,46 @@
   Py_INCREF(__pyx_v_statistics);
   __pyx_v_tmpx = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":267 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_statistics, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;}
-  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":193 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_statistics, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;}
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;}
   Py_INCREF(__pyx_n_approximate);
   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_approximate);
   Py_INCREF(__pyx_n_exact);
   PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_exact);
-  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;}
+  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;}
   __pyx_3 = !__pyx_3;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_3) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":268 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;}
-    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;}
-    Py_INCREF(__pyx_k42p);
-    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k42p);
-    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":194 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;}
+    Py_INCREF(__pyx_k33p);
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k33p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_1); __pyx_1 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":270 */
-  __pyx_2 = PyObject_GetAttr(__pyx_v_statistics, __pyx_n_lower); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; goto __pyx_L1;}
-  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":196 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_statistics, __pyx_n_lower); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;}
+  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_tmpx);
   __pyx_v_tmpx = __pyx_1;
   __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":271 */
-  __pyx_5 = PyString_AsString(__pyx_v_tmpx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":197 */
+  __pyx_5 = PyString_AsString(__pyx_v_tmpx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; goto __pyx_L1;}
   ((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->statistics = __pyx_5;
 
   __pyx_r = 0;
@@ -739,8 +847,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":287 */
-  __pyx_1 = PyString_FromString(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->trace_hat); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":213 */
+  __pyx_1 = PyString_FromString(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->trace_hat); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -756,9 +864,9 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_k45p;
+static PyObject *__pyx_k36p;
 
-static char (__pyx_k45[]) = "Invalid value for the 'trace_hat' argument: should be in ('approximate', 'exact').";
+static char (__pyx_k36[]) = "Invalid value for the 'trace_hat' argument: should be in ('approximate', 'exact').";
 
 static int __pyx_f_6_loess_13loess_control_9trace_hat___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_trace_hat); /*proto*/
 static int __pyx_f_6_loess_13loess_control_9trace_hat___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_trace_hat) {
@@ -773,46 +881,46 @@
   Py_INCREF(__pyx_v_trace_hat);
   __pyx_v_tmpx = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":289 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_trace_hat, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
-  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":215 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_trace_hat, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
   Py_INCREF(__pyx_n_approximate);
   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_approximate);
   Py_INCREF(__pyx_n_exact);
   PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_exact);
-  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
+  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; goto __pyx_L1;}
   __pyx_3 = !__pyx_3;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_3) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":290 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
-    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
-    Py_INCREF(__pyx_k45p);
-    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k45p);
-    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":216 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;}
+    Py_INCREF(__pyx_k36p);
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k36p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_1); __pyx_1 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":292 */
-  __pyx_2 = PyObject_GetAttr(__pyx_v_trace_hat, __pyx_n_lower); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;}
-  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":218 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_trace_hat, __pyx_n_lower); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
+  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_tmpx);
   __pyx_v_tmpx = __pyx_1;
   __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":293 */
-  __pyx_5 = PyString_AsString(__pyx_v_tmpx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":219 */
+  __pyx_5 = PyString_AsString(__pyx_v_tmpx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; goto __pyx_L1;}
   ((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->trace_hat = __pyx_5;
 
   __pyx_r = 0;
@@ -836,8 +944,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":302 */
-  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->iterations); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":228 */
+  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->iterations); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -853,9 +961,9 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_k46p;
+static PyObject *__pyx_k37p;
 
-static char (__pyx_k46[]) = "Invalid number of iterations: should be positive";
+static char (__pyx_k37[]) = "Invalid number of iterations: should be positive";
 
 static int __pyx_f_6_loess_13loess_control_10iterations___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_iterations); /*proto*/
 static int __pyx_f_6_loess_13loess_control_10iterations___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_iterations) {
@@ -867,30 +975,30 @@
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_iterations);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":304 */
-  __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_v_iterations, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":230 */
+  __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_iterations, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;}
   __pyx_2 = __pyx_2 < 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_2) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":305 */
-    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
-    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
-    Py_INCREF(__pyx_k46p);
-    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k46p);
-    __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":231 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;}
+    Py_INCREF(__pyx_k37p);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k37p);
+    __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;}
     Py_DECREF(__pyx_1); __pyx_1 = 0;
     Py_DECREF(__pyx_3); __pyx_3 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":306 */
-  __pyx_2 = PyInt_AsLong(__pyx_v_iterations); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":232 */
+  __pyx_2 = PyInt_AsLong(__pyx_v_iterations); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; goto __pyx_L1;}
   ((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->iterations = __pyx_2;
 
   __pyx_r = 0;
@@ -913,8 +1021,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":318 */
-  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->cell); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":244 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->cell); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -930,9 +1038,9 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_k47p;
+static PyObject *__pyx_k38p;
 
-static char (__pyx_k47[]) = "Invalid value for the cell argument: should be positive";
+static char (__pyx_k38[]) = "Invalid value for the cell argument: should be positive";
 
 static int __pyx_f_6_loess_13loess_control_4cell___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cell); /*proto*/
 static int __pyx_f_6_loess_13loess_control_4cell___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cell) {
@@ -945,30 +1053,30 @@
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_cell);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":320 */
-  __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_v_cell, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":246 */
+  __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_cell, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; goto __pyx_L1;}
   __pyx_2 = __pyx_2 <= 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_2) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":321 */
-    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;}
-    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;}
-    Py_INCREF(__pyx_k47p);
-    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k47p);
-    __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":247 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;}
+    Py_INCREF(__pyx_k38p);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k38p);
+    __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;}
     Py_DECREF(__pyx_1); __pyx_1 = 0;
     Py_DECREF(__pyx_3); __pyx_3 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":322 */
-  __pyx_5 = PyFloat_AsDouble(__pyx_v_cell); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":248 */
+  __pyx_5 = PyFloat_AsDouble(__pyx_v_cell); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; goto __pyx_L1;}
   ((struct __pyx_obj_6_loess_loess_control *)__pyx_v_self)->_base->cell = __pyx_5;
 
   __pyx_r = 0;
@@ -1023,122 +1131,122 @@
   __pyx_v_iterations = Py_None; Py_INCREF(Py_None);
   __pyx_v_cell = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":326 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":252 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; goto __pyx_L1;}
   Py_INCREF(__pyx_n_surface);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_surface);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_surface);
   __pyx_v_surface = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":327 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":253 */
   __pyx_4 = __pyx_v_surface != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":328 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_surface, __pyx_v_surface) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":254 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_surface, __pyx_v_surface) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":330 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":256 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;}
   Py_INCREF(__pyx_n_statistics);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_statistics);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_statistics);
   __pyx_v_statistics = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":331 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":257 */
   __pyx_4 = __pyx_v_statistics != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":332 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_statistics, __pyx_v_statistics) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":258 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_statistics, __pyx_v_statistics) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":334 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":260 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;}
   Py_INCREF(__pyx_n_trace_hat);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_trace_hat);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_trace_hat);
   __pyx_v_trace_hat = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":335 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":261 */
   __pyx_4 = __pyx_v_trace_hat != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":336 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_trace_hat, __pyx_v_trace_hat) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":262 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_trace_hat, __pyx_v_trace_hat) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":338 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":264 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; goto __pyx_L1;}
   Py_INCREF(__pyx_n_iterations);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_iterations);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_iterations);
   __pyx_v_iterations = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":339 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":265 */
   __pyx_4 = __pyx_v_iterations != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":340 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_iterations, __pyx_v_iterations) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":266 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_iterations, __pyx_v_iterations) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; goto __pyx_L1;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":342 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":268 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;}
   Py_INCREF(__pyx_n_cell);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_cell);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_cell);
   __pyx_v_cell = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":343 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":269 */
   __pyx_4 = __pyx_v_cell != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":344 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_parametric_flags, __pyx_v_cell) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":270 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_parametric_flags, __pyx_v_cell) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; goto __pyx_L1;}
     goto __pyx_L6;
   }
   __pyx_L6:;
@@ -1166,21 +1274,21 @@
 
 static PyObject *__pyx_n_join;
 
-static PyObject *__pyx_k53p;
-static PyObject *__pyx_k54p;
-static PyObject *__pyx_k55p;
-static PyObject *__pyx_k56p;
-static PyObject *__pyx_k57p;
-static PyObject *__pyx_k58p;
-static PyObject *__pyx_k59p;
+static PyObject *__pyx_k44p;
+static PyObject *__pyx_k45p;
+static PyObject *__pyx_k46p;
+static PyObject *__pyx_k47p;
+static PyObject *__pyx_k48p;
+static PyObject *__pyx_k49p;
+static PyObject *__pyx_k50p;
 
-static char (__pyx_k53[]) = "Control          :";
-static char (__pyx_k54[]) = "Surface type     : %s";
-static char (__pyx_k55[]) = "Statistics       : %s";
-static char (__pyx_k56[]) = "Trace estimation : %s";
-static char (__pyx_k57[]) = "Cell size        : %s";
-static char (__pyx_k58[]) = "Nb iterations    : %s";
-static char (__pyx_k59[]) = "\n";
+static char (__pyx_k44[]) = "Control          :";
+static char (__pyx_k45[]) = "Surface type     : %s";
+static char (__pyx_k46[]) = "Statistics       : %s";
+static char (__pyx_k47[]) = "Trace estimation : %s";
+static char (__pyx_k48[]) = "Cell size        : %s";
+static char (__pyx_k49[]) = "Nb iterations    : %s";
+static char (__pyx_k50[]) = "\n";
 
 static PyObject *__pyx_f_6_loess_13loess_control___str__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_f_6_loess_13loess_control___str__(PyObject *__pyx_v_self) {
@@ -1195,25 +1303,25 @@
   Py_INCREF(__pyx_v_self);
   __pyx_v_strg = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":348 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_surface); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;}
-  __pyx_2 = PyNumber_Remainder(__pyx_k54p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":274 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_surface); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k45p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_statistics); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;}
-  __pyx_3 = PyNumber_Remainder(__pyx_k55p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_statistics); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;}
+  __pyx_3 = PyNumber_Remainder(__pyx_k46p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_trace_hat); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; goto __pyx_L1;}
-  __pyx_4 = PyNumber_Remainder(__pyx_k56p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_trace_hat); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Remainder(__pyx_k47p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_cell); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;}
-  __pyx_5 = PyNumber_Remainder(__pyx_k57p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_cell); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;}
+  __pyx_5 = PyNumber_Remainder(__pyx_k48p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_iterations); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; goto __pyx_L1;}
-  __pyx_6 = PyNumber_Remainder(__pyx_k58p, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_iterations); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; goto __pyx_L1;}
+  __pyx_6 = PyNumber_Remainder(__pyx_k49p, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyList_New(6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; goto __pyx_L1;}
-  Py_INCREF(__pyx_k53p);
-  PyList_SET_ITEM(__pyx_1, 0, __pyx_k53p);
+  __pyx_1 = PyList_New(6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; goto __pyx_L1;}
+  Py_INCREF(__pyx_k44p);
+  PyList_SET_ITEM(__pyx_1, 0, __pyx_k44p);
   PyList_SET_ITEM(__pyx_1, 1, __pyx_2);
   PyList_SET_ITEM(__pyx_1, 2, __pyx_3);
   PyList_SET_ITEM(__pyx_1, 3, __pyx_4);
@@ -1228,12 +1336,12 @@
   __pyx_v_strg = __pyx_1;
   __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":354 */
-  __pyx_2 = PyObject_GetAttr(__pyx_k59p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; goto __pyx_L1;}
-  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":280 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k50p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
   Py_INCREF(__pyx_v_strg);
   PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_strg);
-  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   __pyx_r = __pyx_4;
@@ -1261,13 +1369,13 @@
   PyObject *__pyx_r;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":375 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":335 */
   __pyx_v_self->_base = __pyx_v_base;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":376 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":336 */
   __pyx_v_self->npar = __pyx_v_npar;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":386 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":337 */
   Py_INCREF(((PyObject *)__pyx_v_self));
   __pyx_r = ((PyObject *)__pyx_v_self);
   goto __pyx_L0;
@@ -1286,13 +1394,13 @@
   PyObject *__pyx_3 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":399 */
-  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
-  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->normalize); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
-  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":341 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; goto __pyx_L1;}
+  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->normalize); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
   __pyx_2 = 0;
-  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   __pyx_r = __pyx_2;
@@ -1319,8 +1427,8 @@
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_normalize);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":401 */
-  __pyx_1 = PyInt_AsLong(__pyx_v_normalize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":343 */
+  __pyx_1 = PyInt_AsLong(__pyx_v_normalize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; goto __pyx_L1;}
   ((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->normalize = __pyx_1;
 
   __pyx_r = 0;
@@ -1340,8 +1448,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":407 */
-  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->span); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":347 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->span); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -1357,9 +1465,9 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_k60p;
+static PyObject *__pyx_k51p;
 
-static char (__pyx_k60[]) = "Span should be between 0 and 1!";
+static char (__pyx_k51[]) = "Span should be between 0 and 1!";
 
 static int __pyx_f_6_loess_11loess_model_4span___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_span); /*proto*/
 static int __pyx_f_6_loess_11loess_model_4span___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_span) {
@@ -1372,36 +1480,36 @@
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_span);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":409 */
-  __pyx_2 = PyFloat_FromDouble(0.); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_v_span, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":349 */
+  __pyx_2 = PyFloat_FromDouble(0.); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_span, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;}
   __pyx_1 = __pyx_1 <= 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   if (!__pyx_1) {
-    __pyx_2 = PyFloat_FromDouble(1.); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L1;}
-    if (PyObject_Cmp(__pyx_v_span, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L1;}
+    __pyx_2 = PyFloat_FromDouble(1.); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;}
+    if (PyObject_Cmp(__pyx_v_span, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; goto __pyx_L1;}
     __pyx_1 = __pyx_1 > 0;
     Py_DECREF(__pyx_2); __pyx_2 = 0;
   }
   if (__pyx_1) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":410 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;}
-    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;}
-    Py_INCREF(__pyx_k60p);
-    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k60p);
-    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":350 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;}
+    Py_INCREF(__pyx_k51p);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k51p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_3); __pyx_3 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":411 */
-  __pyx_5 = PyFloat_AsDouble(__pyx_v_span); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":351 */
+  __pyx_5 = PyFloat_AsDouble(__pyx_v_span); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; goto __pyx_L1;}
   ((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->span = __pyx_5;
 
   __pyx_r = 0;
@@ -1424,8 +1532,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":420 */
-  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->degree); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":355 */
+  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->degree); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -1441,9 +1549,9 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_k61p;
+static PyObject *__pyx_k52p;
 
-static char (__pyx_k61[]) = "Degree should be between 0 and 2!";
+static char (__pyx_k52[]) = "Degree should be between 0 and 2!";
 
 static int __pyx_f_6_loess_11loess_model_6degree___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_degree); /*proto*/
 static int __pyx_f_6_loess_11loess_model_6degree___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_degree) {
@@ -1455,34 +1563,38 @@
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_degree);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":422 */
-  __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_v_degree, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":357 */
+  __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_degree, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
   __pyx_1 = __pyx_1 < 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   if (!__pyx_1) {
-    __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
-    if (PyObject_Cmp(__pyx_v_degree, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
+    __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
+    if (PyObject_Cmp(__pyx_v_degree, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; goto __pyx_L1;}
     __pyx_1 = __pyx_1 > 0;
     Py_DECREF(__pyx_2); __pyx_2 = 0;
   }
   if (__pyx_1) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":423 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;}
-    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;}
-    Py_INCREF(__pyx_k61p);
-    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k61p);
-    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":358 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
+    Py_INCREF(__pyx_k52p);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k52p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_3); __pyx_3 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":359 */
+  __pyx_1 = PyInt_AsLong(__pyx_v_degree); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; goto __pyx_L1;}
+  ((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->degree = __pyx_1;
+
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1:;
@@ -1503,8 +1615,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":434 */
-  __pyx_1 = PyString_FromString(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->family); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":363 */
+  __pyx_1 = PyString_FromString(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->family); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -1523,9 +1635,9 @@
 static PyObject *__pyx_n_symmetric;
 static PyObject *__pyx_n_gaussian;
 
-static PyObject *__pyx_k64p;
+static PyObject *__pyx_k55p;
 
-static char (__pyx_k64[]) = "Invalid value for the 'family' argument: should be in ('symmetric', 'gaussian').";
+static char (__pyx_k55[]) = "Invalid value for the 'family' argument: should be in ('symmetric', 'gaussian').";
 
 static int __pyx_f_6_loess_11loess_model_6family___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_family); /*proto*/
 static int __pyx_f_6_loess_11loess_model_6family___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_family) {
@@ -1538,38 +1650,38 @@
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_family);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":436 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_family, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;}
-  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":365 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_family, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;}
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
   Py_INCREF(__pyx_n_symmetric);
   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_symmetric);
   Py_INCREF(__pyx_n_gaussian);
   PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_gaussian);
-  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;}
+  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; goto __pyx_L1;}
   __pyx_3 = !__pyx_3;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_3) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":437 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
-    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
-    Py_INCREF(__pyx_k64p);
-    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k64p);
-    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":366 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
+    Py_INCREF(__pyx_k55p);
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k55p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_1); __pyx_1 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":439 */
-  __pyx_5 = PyString_AsString(__pyx_v_family); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":368 */
+  __pyx_5 = PyString_AsString(__pyx_v_family); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
   ((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->family = __pyx_5;
 
   __pyx_r = 0;
@@ -1592,8 +1704,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":450 */
-  __pyx_1 = __pyx_f_6_loess_boolarray_from_data(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar,1,((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->parametric); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":372 */
+  __pyx_1 = __pyx_f_6_loess_boolarray_from_data(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar,1,((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->parametric); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -1610,10 +1722,6 @@
 }
 
 static PyObject *__pyx_n_atleast_1d;
-static PyObject *__pyx_n_copy;
-static PyObject *__pyx_n_True;
-static PyObject *__pyx_n_subok;
-static PyObject *__pyx_n_dtype;
 static PyObject *__pyx_n_min;
 
 
@@ -1634,62 +1742,62 @@
   Py_INCREF(__pyx_v_paramf);
   __pyx_v_p_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":454 */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
-  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_atleast_1d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":376 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_atleast_1d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
-  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
   Py_INCREF(__pyx_v_paramf);
   PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_paramf);
-  __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
-  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_4, __pyx_n_copy, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
+  __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_copy, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
-  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_4, __pyx_n_subok, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_subok, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
-  __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; goto __pyx_L1;}
-  __pyx_6 = PyObject_GetAttr(__pyx_5, __pyx_n_bool); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_5, __pyx_n_bool); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
-  if (PyDict_SetItem(__pyx_4, __pyx_n_dtype, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_dtype, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
-  __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
+  __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
+  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
   __pyx_5 = 0;
-  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
+  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_6); __pyx_6 = 0;
-  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
   Py_DECREF(((PyObject *)__pyx_v_p_ndr));
   __pyx_v_p_ndr = ((PyArrayObject *)__pyx_1);
   __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":456 */
-  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_min); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
-  __pyx_4 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
-  __pyx_5 = PyObject_GetAttr(((PyObject *)__pyx_v_p_ndr), __pyx_n_size); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":378 */
+  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_min); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;}
+  __pyx_4 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;}
+  __pyx_5 = PyObject_GetAttr(((PyObject *)__pyx_v_p_ndr), __pyx_n_size); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
   PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5);
   __pyx_4 = 0;
   __pyx_5 = 0;
-  __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
+  __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_7 = PyInt_AsLong(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
+  __pyx_7 = PyInt_AsLong(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
   for (__pyx_v_i = 0; __pyx_v_i < __pyx_7; ++__pyx_v_i) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":457 */
-    __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; goto __pyx_L1;}
-    __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_p_ndr), __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":379 */
+    __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;}
+    __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_p_ndr), __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;}
     Py_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_8 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; goto __pyx_L1;}
+    __pyx_8 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;}
     Py_DECREF(__pyx_4); __pyx_4 = 0;
     (((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->parametric[__pyx_v_i]) = __pyx_8;
   }
@@ -1718,8 +1826,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":468 */
-  __pyx_1 = __pyx_f_6_loess_boolarray_from_data(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar,1,((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->drop_square); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":383 */
+  __pyx_1 = __pyx_f_6_loess_boolarray_from_data(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar,1,((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->drop_square); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -1753,62 +1861,62 @@
   Py_INCREF(__pyx_v_drop_sq);
   __pyx_v_d_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":472 */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
-  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_atleast_1d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":387 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_atleast_1d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
-  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
   Py_INCREF(__pyx_v_drop_sq);
   PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_drop_sq);
-  __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
-  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_4, __pyx_n_copy, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
+  __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_copy, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
-  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_4, __pyx_n_subok, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_subok, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
-  __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; goto __pyx_L1;}
-  __pyx_6 = PyObject_GetAttr(__pyx_5, __pyx_n_bool); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_5, __pyx_n_bool); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
-  if (PyDict_SetItem(__pyx_4, __pyx_n_dtype, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_dtype, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
-  __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
+  __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
+  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
   __pyx_5 = 0;
-  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
+  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_6); __pyx_6 = 0;
-  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
   Py_DECREF(((PyObject *)__pyx_v_d_ndr));
   __pyx_v_d_ndr = ((PyArrayObject *)__pyx_1);
   __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":474 */
-  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_min); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;}
-  __pyx_4 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;}
-  __pyx_5 = PyObject_GetAttr(((PyObject *)__pyx_v_d_ndr), __pyx_n_size); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":389 */
+  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_min); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
+  __pyx_4 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
+  __pyx_5 = PyObject_GetAttr(((PyObject *)__pyx_v_d_ndr), __pyx_n_size); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
   PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5);
   __pyx_4 = 0;
   __pyx_5 = 0;
-  __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;}
+  __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_7 = PyInt_AsLong(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;}
+  __pyx_7 = PyInt_AsLong(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
   for (__pyx_v_i = 0; __pyx_v_i < __pyx_7; ++__pyx_v_i) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":475 */
-    __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
-    __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_d_ndr), __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":390 */
+    __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L1;}
+    __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_d_ndr), __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L1;}
     Py_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_8 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
+    __pyx_8 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L1;}
     Py_DECREF(__pyx_4); __pyx_4 = 0;
     (((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->_base->drop_square[__pyx_v_i]) = __pyx_8;
   }
@@ -1870,146 +1978,146 @@
   __pyx_v_parametric = Py_None; Py_INCREF(Py_None);
   __pyx_v_drop_square = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":478 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":393 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L1;}
   Py_INCREF(__pyx_n_family);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_family);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_family);
   __pyx_v_family = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":479 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":394 */
   __pyx_4 = __pyx_v_family != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":480 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_family, __pyx_v_family) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":395 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_family, __pyx_v_family) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":482 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":397 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L1;}
   Py_INCREF(__pyx_n_span);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_span);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_span);
   __pyx_v_span = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":483 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":398 */
   __pyx_4 = __pyx_v_span != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":484 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_span, __pyx_v_span) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":399 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_span, __pyx_v_span) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":486 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":401 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
   Py_INCREF(__pyx_n_degree);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_degree);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_degree);
   __pyx_v_degree = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":487 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":402 */
   __pyx_4 = __pyx_v_degree != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":488 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_degree, __pyx_v_degree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":403 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_degree, __pyx_v_degree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":490 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":405 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;}
   Py_INCREF(__pyx_n_normalize);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_normalize);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_normalize);
   __pyx_v_normalize = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":491 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":406 */
   __pyx_4 = __pyx_v_normalize != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":492 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_normalize, __pyx_v_normalize) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":407 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_normalize, __pyx_v_normalize) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; goto __pyx_L1;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":494 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":409 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L1;}
   Py_INCREF(__pyx_n_parametric);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_parametric);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_parametric);
   __pyx_v_parametric = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":495 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":410 */
   __pyx_4 = __pyx_v_parametric != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":496 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_parametric_flags, __pyx_v_parametric) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":411 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_parametric_flags, __pyx_v_parametric) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; goto __pyx_L1;}
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":498 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":413 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L1;}
   Py_INCREF(__pyx_n_drop_square);
   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_drop_square);
   Py_INCREF(Py_None);
   PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_v_drop_square);
   __pyx_v_drop_square = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":499 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":414 */
   __pyx_4 = __pyx_v_drop_square != Py_None;
   if (__pyx_4) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":500 */
-    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_drop_square_flags, __pyx_v_drop_square) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":415 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_drop_square_flags, __pyx_v_drop_square) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; goto __pyx_L1;}
     goto __pyx_L7;
   }
   __pyx_L7:;
@@ -2036,64 +2144,43 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_n_id;
+static PyObject *__pyx_k68p;
 
-static PyObject *__pyx_k77p;
+static char (__pyx_k68[]) = "<loess object: model parameters>";
 
-static char (__pyx_k77[]) = "loess model parameters @%s";
-
 static PyObject *__pyx_f_6_loess_11loess_model___repr__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_f_6_loess_11loess_model___repr__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r;
-  PyObject *__pyx_1 = 0;
-  PyObject *__pyx_2 = 0;
-  PyObject *__pyx_3 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":503 */
-  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_id); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;}
-  Py_INCREF(__pyx_v_self);
-  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self);
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;}
-  Py_DECREF(__pyx_1); __pyx_1 = 0;
-  Py_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_1 = PyNumber_Remainder(__pyx_k77p, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;}
-  Py_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_r = __pyx_1;
-  __pyx_1 = 0;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":418 */
+  Py_INCREF(__pyx_k68p);
+  __pyx_r = __pyx_k68p;
   goto __pyx_L0;
 
   __pyx_r = Py_None; Py_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1:;
-  Py_XDECREF(__pyx_1);
-  Py_XDECREF(__pyx_2);
-  Py_XDECREF(__pyx_3);
-  __Pyx_AddTraceback("_loess.loess_model.__repr__");
-  __pyx_r = 0;
   __pyx_L0:;
   Py_DECREF(__pyx_v_self);
   return __pyx_r;
 }
 
-static PyObject *__pyx_k78p;
-static PyObject *__pyx_k79p;
-static PyObject *__pyx_k80p;
-static PyObject *__pyx_k81p;
-static PyObject *__pyx_k82p;
-static PyObject *__pyx_k83p;
-static PyObject *__pyx_k84p;
-static PyObject *__pyx_k85p;
+static PyObject *__pyx_k69p;
+static PyObject *__pyx_k70p;
+static PyObject *__pyx_k71p;
+static PyObject *__pyx_k72p;
+static PyObject *__pyx_k73p;
+static PyObject *__pyx_k74p;
+static PyObject *__pyx_k75p;
+static PyObject *__pyx_k76p;
 
-static char (__pyx_k78[]) = "Model parameters.....";
-static char (__pyx_k79[]) = "family      : %s";
-static char (__pyx_k80[]) = "span        : %s";
-static char (__pyx_k81[]) = "degree      : %s";
-static char (__pyx_k82[]) = "normalized  : %s";
-static char (__pyx_k83[]) = "parametric  : %s";
-static char (__pyx_k84[]) = "drop_square : %s";
-static char (__pyx_k85[]) = "\n";
+static char (__pyx_k69[]) = "Model parameters.....";
+static char (__pyx_k70[]) = "Family          : %s";
+static char (__pyx_k71[]) = "Span            : %s";
+static char (__pyx_k72[]) = "Degree          : %s";
+static char (__pyx_k73[]) = "Normalized      : %s";
+static char (__pyx_k74[]) = "Parametric      : %s";
+static char (__pyx_k75[]) = "Drop_square     : %s";
+static char (__pyx_k76[]) = "\n";
 
 static PyObject *__pyx_f_6_loess_11loess_model___str__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_f_6_loess_11loess_model___str__(PyObject *__pyx_v_self) {
@@ -2109,32 +2196,32 @@
   Py_INCREF(__pyx_v_self);
   __pyx_v_strg = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":506 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_family); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
-  __pyx_2 = PyNumber_Remainder(__pyx_k79p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":421 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_family); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k70p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_span); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;}
-  __pyx_3 = PyNumber_Remainder(__pyx_k80p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_span); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;}
+  __pyx_3 = PyNumber_Remainder(__pyx_k71p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_degree); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; goto __pyx_L1;}
-  __pyx_4 = PyNumber_Remainder(__pyx_k81p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_degree); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Remainder(__pyx_k72p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_normalize); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;}
-  __pyx_5 = PyNumber_Remainder(__pyx_k82p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_normalize); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; goto __pyx_L1;}
+  __pyx_5 = PyNumber_Remainder(__pyx_k73p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_parametric_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;}
-  __pyx_6 = PySequence_GetSlice(__pyx_1, 0, ((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_parametric_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;}
+  __pyx_6 = PySequence_GetSlice(__pyx_1, 0, ((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyNumber_Remainder(__pyx_k83p, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;}
+  __pyx_1 = PyNumber_Remainder(__pyx_k74p, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
-  __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_drop_square_flags); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
-  __pyx_7 = PySequence_GetSlice(__pyx_6, 0, ((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_drop_square_flags); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
+  __pyx_7 = PySequence_GetSlice(__pyx_6, 0, ((struct __pyx_obj_6_loess_loess_model *)__pyx_v_self)->npar); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
-  __pyx_6 = PyNumber_Remainder(__pyx_k84p, __pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
+  __pyx_6 = PyNumber_Remainder(__pyx_k75p, __pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; goto __pyx_L1;}
   Py_DECREF(__pyx_7); __pyx_7 = 0;
-  __pyx_7 = PyList_New(7); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; goto __pyx_L1;}
-  Py_INCREF(__pyx_k78p);
-  PyList_SET_ITEM(__pyx_7, 0, __pyx_k78p);
+  __pyx_7 = PyList_New(7); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; goto __pyx_L1;}
+  Py_INCREF(__pyx_k69p);
+  PyList_SET_ITEM(__pyx_7, 0, __pyx_k69p);
   PyList_SET_ITEM(__pyx_7, 1, __pyx_2);
   PyList_SET_ITEM(__pyx_7, 2, __pyx_3);
   PyList_SET_ITEM(__pyx_7, 3, __pyx_4);
@@ -2151,12 +2238,12 @@
   __pyx_v_strg = __pyx_7;
   __pyx_7 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":514 */
-  __pyx_2 = PyObject_GetAttr(__pyx_k85p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L1;}
-  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":429 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k76p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; goto __pyx_L1;}
   Py_INCREF(__pyx_v_strg);
   PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_strg);
-  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   __pyx_r = __pyx_4;
@@ -2181,14 +2268,46 @@
   return __pyx_r;
 }
 
+static PyObject *__pyx_f_6_loess_13loess_outputs_setup(struct __pyx_obj_6_loess_loess_outputs *__pyx_v_self,loess_outputs (*__pyx_v_base),long __pyx_v_nobs,long __pyx_v_npar) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":468 */
+  __pyx_v_self->_base = __pyx_v_base;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":469 */
+  __pyx_v_self->nobs = __pyx_v_nobs;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":470 */
+  __pyx_v_self->npar = __pyx_v_npar;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":471 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; goto __pyx_L1;}
+  __pyx_2 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_v_self->activated = __pyx_2;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_loess.loess_outputs.setup");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
 static PyObject *__pyx_f_6_loess_13loess_outputs_13fitted_values___get__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_f_6_loess_13loess_outputs_13fitted_values___get__(PyObject *__pyx_v_self) {
   PyObject *__pyx_r;
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":530 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->fitted_values); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":475 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->fitted_values); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2210,8 +2329,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":538 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->fitted_residuals); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":479 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->fitted_residuals); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2233,8 +2352,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":547 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->pseudovalues); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":483 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->pseudovalues); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2256,8 +2375,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":555 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->diagonal); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":487 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->diagonal); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2279,8 +2398,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":563 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->robust); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":491 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->nobs,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->robust); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2302,8 +2421,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":568 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->npar,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->divisor); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":495 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->npar,1,((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->divisor); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2325,8 +2444,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":576 */
-  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->enp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":499 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->enp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2348,8 +2467,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":584 */
-  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":503 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2371,8 +2490,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":592 */
-  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->one_delta); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":507 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->one_delta); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2394,8 +2513,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":600 */
-  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->two_delta); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":511 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->two_delta); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2417,8 +2536,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":608 */
-  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->trace_hat); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":515 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_outputs *)__pyx_v_self)->_base->trace_hat); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2442,23 +2561,23 @@
 static PyObject *__pyx_n_two_delta;
 static PyObject *__pyx_n_divisor;
 
-static PyObject *__pyx_k86p;
-static PyObject *__pyx_k87p;
-static PyObject *__pyx_k88p;
-static PyObject *__pyx_k89p;
-static PyObject *__pyx_k90p;
-static PyObject *__pyx_k91p;
-static PyObject *__pyx_k92p;
-static PyObject *__pyx_k93p;
+static PyObject *__pyx_k77p;
+static PyObject *__pyx_k78p;
+static PyObject *__pyx_k79p;
+static PyObject *__pyx_k80p;
+static PyObject *__pyx_k81p;
+static PyObject *__pyx_k82p;
+static PyObject *__pyx_k83p;
+static PyObject *__pyx_k84p;
 
-static char (__pyx_k86[]) = "Outputs................";
-static char (__pyx_k87[]) = "Fitted values         : %s\n";
-static char (__pyx_k88[]) = "Fitted residuals      : %s\n";
-static char (__pyx_k89[]) = "Eqv. nb of parameters : %s";
-static char (__pyx_k90[]) = "Residual error        : %s";
-static char (__pyx_k91[]) = "Deltas                : %s - %s";
-static char (__pyx_k92[]) = "Normalization factors : %s";
-static char (__pyx_k93[]) = "\n";
+static char (__pyx_k77[]) = "Outputs................";
+static char (__pyx_k78[]) = "Fitted values         : %s\n";
+static char (__pyx_k79[]) = "Fitted residuals      : %s\n";
+static char (__pyx_k80[]) = "Eqv. nb of parameters : %s";
+static char (__pyx_k81[]) = "Residual error        : %s";
+static char (__pyx_k82[]) = "Deltas                : %s - %s";
+static char (__pyx_k83[]) = "Normalization factors : %s";
+static char (__pyx_k84[]) = "\n";
 
 static PyObject *__pyx_f_6_loess_13loess_outputs___str__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_f_6_loess_13loess_outputs___str__(PyObject *__pyx_v_self) {
@@ -2474,34 +2593,34 @@
   Py_INCREF(__pyx_v_self);
   __pyx_v_strg = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":611 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_fitted_values); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; goto __pyx_L1;}
-  __pyx_2 = PyNumber_Remainder(__pyx_k87p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":518 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_fitted_values); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k78p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_fitted_residuals); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L1;}
-  __pyx_3 = PyNumber_Remainder(__pyx_k88p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_fitted_residuals); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; goto __pyx_L1;}
+  __pyx_3 = PyNumber_Remainder(__pyx_k79p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_enp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L1;}
-  __pyx_4 = PyNumber_Remainder(__pyx_k89p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_enp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Remainder(__pyx_k80p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
-  __pyx_5 = PyNumber_Remainder(__pyx_k90p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; goto __pyx_L1;}
+  __pyx_5 = PyNumber_Remainder(__pyx_k81p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_one_delta); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; goto __pyx_L1;}
-  __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_two_delta); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; goto __pyx_L1;}
-  __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_one_delta); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_two_delta); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
+  __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1);
   PyTuple_SET_ITEM(__pyx_7, 1, __pyx_6);
   __pyx_1 = 0;
   __pyx_6 = 0;
-  __pyx_1 = PyNumber_Remainder(__pyx_k91p, __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; goto __pyx_L1;}
+  __pyx_1 = PyNumber_Remainder(__pyx_k82p, __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
   Py_DECREF(__pyx_7); __pyx_7 = 0;
-  __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_divisor); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;}
-  __pyx_7 = PyNumber_Remainder(__pyx_k92p, __pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_divisor); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;}
+  __pyx_7 = PyNumber_Remainder(__pyx_k83p, __pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
-  __pyx_6 = PyList_New(7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;}
-  Py_INCREF(__pyx_k86p);
-  PyList_SET_ITEM(__pyx_6, 0, __pyx_k86p);
+  __pyx_6 = PyList_New(7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;}
+  Py_INCREF(__pyx_k77p);
+  PyList_SET_ITEM(__pyx_6, 0, __pyx_k77p);
   PyList_SET_ITEM(__pyx_6, 1, __pyx_2);
   PyList_SET_ITEM(__pyx_6, 2, __pyx_3);
   PyList_SET_ITEM(__pyx_6, 3, __pyx_4);
@@ -2518,12 +2637,12 @@
   __pyx_v_strg = __pyx_6;
   __pyx_6 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":618 */
-  __pyx_2 = PyObject_GetAttr(__pyx_k93p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;}
-  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":525 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k84p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;}
   Py_INCREF(__pyx_v_strg);
   PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_strg);
-  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   __pyx_r = __pyx_4;
@@ -2548,31 +2667,41 @@
   return __pyx_r;
 }
 
+static void __pyx_f_6_loess_14conf_intervals___dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_f_6_loess_14conf_intervals___dealloc__(PyObject *__pyx_v_self) {
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":547 */
+  pw_free_mem((&((struct __pyx_obj_6_loess_conf_intervals *)__pyx_v_self)->_base));
+
+  Py_DECREF(__pyx_v_self);
+}
+
 static PyObject *__pyx_f_6_loess_14conf_intervals_setup(struct __pyx_obj_6_loess_conf_intervals *__pyx_v_self,conf_inv __pyx_v_base,long __pyx_v_nest) {
   PyObject *__pyx_r;
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":633 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":550 */
   __pyx_v_self->_base = __pyx_v_base;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":634 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(__pyx_v_nest,1,__pyx_v_base.fit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":551 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(__pyx_v_nest,1,__pyx_v_base.fit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;}
   Py_DECREF(((PyObject *)__pyx_v_self->fit));
   __pyx_v_self->fit = ((PyArrayObject *)__pyx_1);
   __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":635 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(__pyx_v_nest,1,__pyx_v_base.upper); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":552 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(__pyx_v_nest,1,__pyx_v_base.upper); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
   Py_DECREF(((PyObject *)__pyx_v_self->upper));
   __pyx_v_self->upper = ((PyArrayObject *)__pyx_1);
   __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":636 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(__pyx_v_nest,1,__pyx_v_base.lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":553 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(__pyx_v_nest,1,__pyx_v_base.lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;}
   Py_DECREF(((PyObject *)__pyx_v_self->lower));
   __pyx_v_self->lower = ((PyArrayObject *)__pyx_1);
   __pyx_1 = 0;
@@ -2591,9 +2720,9 @@
 static PyObject *__pyx_n_r_;
 static PyObject *__pyx_n_T;
 
-static PyObject *__pyx_k94p;
+static PyObject *__pyx_k85p;
 
-static char (__pyx_k94[]) = "Confidence intervals....\nLower b./ fit / upper b.\n%s";
+static char (__pyx_k85[]) = "Confidence intervals....\nLower b./ fit / upper b.\n%s";
 
 static PyObject *__pyx_f_6_loess_14conf_intervals___str__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_f_6_loess_14conf_intervals___str__(PyObject *__pyx_v_self) {
@@ -2605,29 +2734,29 @@
   Py_INCREF(__pyx_v_self);
   __pyx_v_tmp_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":640 */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; goto __pyx_L1;}
-  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_r_); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":557 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_r_); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyList_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; goto __pyx_L1;}
+  __pyx_1 = PyList_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}
   Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_conf_intervals *)__pyx_v_self)->lower));
   PyList_SET_ITEM(__pyx_1, 0, ((PyObject *)((struct __pyx_obj_6_loess_conf_intervals *)__pyx_v_self)->lower));
   Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_conf_intervals *)__pyx_v_self)->fit));
   PyList_SET_ITEM(__pyx_1, 1, ((PyObject *)((struct __pyx_obj_6_loess_conf_intervals *)__pyx_v_self)->fit));
   Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_conf_intervals *)__pyx_v_self)->upper));
   PyList_SET_ITEM(__pyx_1, 2, ((PyObject *)((struct __pyx_obj_6_loess_conf_intervals *)__pyx_v_self)->upper));
-  __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_T); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_T); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
-  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; goto __pyx_L1;}
   Py_DECREF(((PyObject *)__pyx_v_tmp_ndr));
   __pyx_v_tmp_ndr = ((PyArrayObject *)__pyx_2);
   __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":641 */
-  __pyx_1 = PyNumber_Remainder(__pyx_k94p, ((PyObject *)__pyx_v_tmp_ndr)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":558 */
+  __pyx_1 = PyNumber_Remainder(__pyx_k85p, ((PyObject *)__pyx_v_tmp_ndr)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2650,7 +2779,7 @@
 static void __pyx_f_6_loess_15loess_predicted___dealloc__(PyObject *__pyx_v_self) {
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":655 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":587 */
   pred_free_mem((&((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base));
 
   Py_DECREF(__pyx_v_self);
@@ -2660,10 +2789,10 @@
   PyObject *__pyx_r;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":658 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":590 */
   __pyx_v_self->_base = __pyx_v_base;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":659 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":591 */
   __pyx_v_self->nest = __pyx_v_nest;
 
   __pyx_r = Py_None; Py_INCREF(Py_None);
@@ -2677,8 +2806,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":693 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->nest,1,((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base.fit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":595 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->nest,1,((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base.fit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2700,8 +2829,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":702 */
-  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->nest,1,((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base.se_fit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":599 */
+  __pyx_1 = __pyx_f_6_loess_floatarray_from_data(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->nest,1,((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base.se_fit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2723,8 +2852,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":710 */
-  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base.residual_scale); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":603 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base.residual_scale); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2746,8 +2875,8 @@
   PyObject *__pyx_1 = 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":719 */
-  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base.df); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":607 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base.df); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; goto __pyx_L1;}
   __pyx_r = __pyx_1;
   __pyx_1 = 0;
   goto __pyx_L0;
@@ -2763,12 +2892,12 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_k95p;
+static PyObject *__pyx_k86p;
 
-static char (__pyx_k95[]) = "The coverage precentage should be between 0 and 1!";
+static char (__pyx_k86[]) = "The coverage precentage should be between 0 and 1!";
 
 static PyObject *__pyx_f_6_loess_15loess_predicted_confidence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_6_loess_15loess_predicted_confidence[] = "Returns the pointwise confidence intervals for each predicted values,\nat the given confidence interval coverage.\n        \n:Parameters:\n    coverage : float\n        Confidence level of the confidence intervals limits, as a fraction.\n        ";
+static char __pyx_doc_6_loess_15loess_predicted_confidence[] = "Returns the pointwise confidence intervals for each predicted values,\nat the given confidence interval coverage.\n        \n:Parameters:\n    coverage : float\n        Confidence level of the confidence intervals limits, as a fraction.\n        \n:Returns:\n    A new conf_intervals object, consisting of:\n    fit : ndarray\n        Predicted values.\n    lower : ndarray\n        Lower bounds of the confidence intervals.\n    upper : ndarray\n        Upper bounds of the confidence intervals.\n        ";
 static PyObject *__pyx_f_6_loess_15loess_predicted_confidence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_coverage = 0;
   conf_inv __pyx_v__confintv;
@@ -2779,21 +2908,21 @@
   PyObject *__pyx_4 = 0;
   double __pyx_5;
   static char *__pyx_argnames[] = {"coverage",0};
-  __pyx_v_coverage = __pyx_k32;
+  __pyx_v_coverage = __pyx_k9;
   if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_coverage)) return 0;
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_coverage);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":730 */
-  __pyx_1 = PyFloat_FromDouble(0.5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_v_coverage, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":627 */
+  __pyx_1 = PyFloat_FromDouble(0.5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_coverage, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; goto __pyx_L1;}
   __pyx_2 = __pyx_2 < 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_2) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":731 */
-    __pyx_1 = PyFloat_FromDouble(1.); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; goto __pyx_L1;}
-    __pyx_3 = PyNumber_Subtract(__pyx_1, __pyx_v_coverage); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":628 */
+    __pyx_1 = PyFloat_FromDouble(1.); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; goto __pyx_L1;}
+    __pyx_3 = PyNumber_Subtract(__pyx_1, __pyx_v_coverage); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; goto __pyx_L1;}
     Py_DECREF(__pyx_1); __pyx_1 = 0;
     Py_DECREF(__pyx_v_coverage);
     __pyx_v_coverage = __pyx_3;
@@ -2802,44 +2931,44 @@
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":732 */
-  __pyx_1 = PyFloat_FromDouble(1.); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_v_coverage, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":629 */
+  __pyx_1 = PyFloat_FromDouble(1.); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_coverage, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; goto __pyx_L1;}
   __pyx_2 = __pyx_2 > 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   if (__pyx_2) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":733 */
-    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; goto __pyx_L1;}
-    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; goto __pyx_L1;}
-    Py_INCREF(__pyx_k95p);
-    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k95p);
-    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":630 */
+    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;}
+    Py_INCREF(__pyx_k86p);
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k86p);
+    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;}
     Py_DECREF(__pyx_3); __pyx_3 = 0;
     Py_DECREF(__pyx_1); __pyx_1 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":734 */
-  __pyx_5 = PyFloat_AsDouble(__pyx_v_coverage); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":631 */
+  __pyx_5 = PyFloat_AsDouble(__pyx_v_coverage); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; goto __pyx_L1;}
   pointwise((&((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->_base),((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->nest,__pyx_5,(&__pyx_v__confintv));
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":735 */
-  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_conf_intervals), 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6_loess_conf_intervals)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":632 */
+  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_conf_intervals), 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6_loess_conf_intervals)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; goto __pyx_L1;}
   Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->confidence_intervals));
   ((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->confidence_intervals = ((struct __pyx_obj_6_loess_conf_intervals *)__pyx_3);
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":736 */
-  __pyx_1 = ((struct __pyx_vtabstruct_6_loess_conf_intervals *)((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->confidence_intervals->__pyx_vtab)->setup(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->confidence_intervals,__pyx_v__confintv,((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->nest); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":633 */
+  __pyx_1 = ((struct __pyx_vtabstruct_6_loess_conf_intervals *)((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->confidence_intervals->__pyx_vtab)->setup(((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->confidence_intervals,__pyx_v__confintv,((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->nest); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":737 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":634 */
   Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->confidence_intervals));
   __pyx_r = ((PyObject *)((struct __pyx_obj_6_loess_loess_predicted *)__pyx_v_self)->confidence_intervals);
   goto __pyx_L0;
@@ -2863,19 +2992,19 @@
 static PyObject *__pyx_n_residual_scale;
 static PyObject *__pyx_n_df;
 
-static PyObject *__pyx_k96p;
-static PyObject *__pyx_k97p;
-static PyObject *__pyx_k98p;
-static PyObject *__pyx_k99p;
-static PyObject *__pyx_k100p;
-static PyObject *__pyx_k101p;
+static PyObject *__pyx_k87p;
+static PyObject *__pyx_k88p;
+static PyObject *__pyx_k89p;
+static PyObject *__pyx_k90p;
+static PyObject *__pyx_k91p;
+static PyObject *__pyx_k92p;
 
-static char (__pyx_k96[]) = "Outputs................";
-static char (__pyx_k97[]) = "Predicted values      : %s\n";
-static char (__pyx_k98[]) = "Predicted std error   : %s\n";
-static char (__pyx_k99[]) = "Residual scale        : %s";
-static char (__pyx_k100[]) = "Degrees of freedom    : %s";
-static char (__pyx_k101[]) = "\n";
+static char (__pyx_k87[]) = "Outputs................";
+static char (__pyx_k88[]) = "Predicted values      : %s\n";
+static char (__pyx_k89[]) = "Predicted std error   : %s\n";
+static char (__pyx_k90[]) = "Residual scale        : %s";
+static char (__pyx_k91[]) = "Degrees of freedom    : %s";
+static char (__pyx_k92[]) = "\n";
 
 static PyObject *__pyx_f_6_loess_15loess_predicted___str__(PyObject *__pyx_v_self); /*proto*/
 static PyObject *__pyx_f_6_loess_15loess_predicted___str__(PyObject *__pyx_v_self) {
@@ -2889,22 +3018,22 @@
   Py_INCREF(__pyx_v_self);
   __pyx_v_strg = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":740 */
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_values); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; goto __pyx_L1;}
-  __pyx_2 = PyNumber_Remainder(__pyx_k97p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":637 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_values); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k88p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_stderr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
-  __pyx_3 = PyNumber_Remainder(__pyx_k98p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_stderr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; goto __pyx_L1;}
+  __pyx_3 = PyNumber_Remainder(__pyx_k89p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_residual_scale); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;}
-  __pyx_4 = PyNumber_Remainder(__pyx_k99p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_residual_scale); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Remainder(__pyx_k90p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_df); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;}
-  __pyx_5 = PyNumber_Remainder(__pyx_k100p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_df); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; goto __pyx_L1;}
+  __pyx_5 = PyNumber_Remainder(__pyx_k91p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_1 = PyList_New(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; goto __pyx_L1;}
-  Py_INCREF(__pyx_k96p);
-  PyList_SET_ITEM(__pyx_1, 0, __pyx_k96p);
+  __pyx_1 = PyList_New(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; goto __pyx_L1;}
+  Py_INCREF(__pyx_k87p);
+  PyList_SET_ITEM(__pyx_1, 0, __pyx_k87p);
   PyList_SET_ITEM(__pyx_1, 1, __pyx_2);
   PyList_SET_ITEM(__pyx_1, 2, __pyx_3);
   PyList_SET_ITEM(__pyx_1, 3, __pyx_4);
@@ -2917,12 +3046,12 @@
   __pyx_v_strg = __pyx_1;
   __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":747 */
-  __pyx_2 = PyObject_GetAttr(__pyx_k101p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; goto __pyx_L1;}
-  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":644 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k92p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
   Py_INCREF(__pyx_v_strg);
   PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_strg);
-  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   __pyx_r = __pyx_4;
@@ -2945,24 +3074,16 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_n_order;
-static PyObject *__pyx_n_C;
-static PyObject *__pyx_n_len;
 static PyObject *__pyx_n_iteritems;
 static PyObject *__pyx_n_update;
 
-static PyObject *__pyx_k110p;
 
-static char (__pyx_k110[]) = "Incompatible size between the response array (%i) and the predictor array (%i)";
-
 static int __pyx_f_6_loess_5loess___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_f_6_loess_5loess___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_x = 0;
   PyObject *__pyx_v_y = 0;
   PyObject *__pyx_v_weights = 0;
   PyObject *__pyx_v_options = 0;
-  PyArrayObject *__pyx_v_x_ndr;
-  PyArrayObject *__pyx_v_y_ndr;
   double (*__pyx_v_x_dat);
   double (*__pyx_v_y_dat);
   PyObject *__pyx_v_n;
@@ -2974,13 +3095,12 @@
   int __pyx_r;
   PyObject *__pyx_1 = 0;
   PyObject *__pyx_2 = 0;
-  PyObject *__pyx_3 = 0;
-  PyObject *__pyx_4 = 0;
-  long __pyx_5;
+  long __pyx_3;
+  long __pyx_4;
+  PyObject *__pyx_5 = 0;
   int __pyx_6;
-  long __pyx_7;
   static char *__pyx_argnames[] = {"x","y","weights",0};
-  __pyx_v_weights = __pyx_k33;
+  __pyx_v_weights = __pyx_k10;
   if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 3, 0, &__pyx_v_options) < 0) return -1;
   if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_x, &__pyx_v_y, &__pyx_v_weights)) {
     Py_XDECREF(__pyx_args);
@@ -2992,8 +3112,6 @@
   Py_INCREF(__pyx_v_x);
   Py_INCREF(__pyx_v_y);
   Py_INCREF(__pyx_v_weights);
-  __pyx_v_x_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
-  __pyx_v_y_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
   __pyx_v_n = Py_None; Py_INCREF(Py_None);
   __pyx_v_p = Py_None; Py_INCREF(Py_None);
   __pyx_v_modelopt = Py_None; Py_INCREF(Py_None);
@@ -3001,298 +3119,186 @@
   __pyx_v_k = Py_None; Py_INCREF(Py_None);
   __pyx_v_v = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":769 */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":764 */
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; goto __pyx_L1;}
   Py_INCREF(__pyx_v_x);
-  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x);
-  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
-  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
-  Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
-  Py_DECREF(__pyx_4); __pyx_4 = 0;
-  if (PyDict_SetItem(__pyx_3, __pyx_n_order, __pyx_n_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
-  __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_x);
+  Py_INCREF(__pyx_v_y);
+  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_y);
+  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_inputs), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  Py_DECREF(__pyx_2); __pyx_2 = 0;
-  Py_DECREF(__pyx_3); __pyx_3 = 0;
-  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
-  Py_DECREF(((PyObject *)__pyx_v_x_ndr));
-  __pyx_v_x_ndr = ((PyArrayObject *)__pyx_4);
-  __pyx_4 = 0;
+  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_6_loess_loess_inputs)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs));
+  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs = ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_2);
+  __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":770 */
-  __pyx_v_x_dat = ((double (*))__pyx_v_x_ndr->data);
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":765 */
+  __pyx_v_x_dat = ((double (*))((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs->x_eff->data);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":771 */
-  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; goto __pyx_L1;}
-  Py_INCREF(((PyObject *)__pyx_v_x_ndr));
-  PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_x_ndr));
-  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; goto __pyx_L1;}
-  Py_DECREF(__pyx_1); __pyx_1 = 0;
-  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":766 */
+  __pyx_v_y_dat = ((double (*))((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs->y_eff->data);
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":767 */
+  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs->nobs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; goto __pyx_L1;}
   Py_DECREF(__pyx_v_n);
-  __pyx_v_n = __pyx_3;
-  __pyx_3 = 0;
+  __pyx_v_n = __pyx_1;
+  __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":772 */
-  __pyx_4 = PyObject_GetAttr(((PyObject *)__pyx_v_x_ndr), __pyx_n_size); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; goto __pyx_L1;}
-  __pyx_1 = PyNumber_Divide(__pyx_4, __pyx_v_n); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; goto __pyx_L1;}
-  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":768 */
+  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs->npar); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;}
   Py_DECREF(__pyx_v_p);
-  __pyx_v_p = __pyx_1;
-  __pyx_1 = 0;
+  __pyx_v_p = __pyx_2;
+  __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":773 */
-  __pyx_5 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; goto __pyx_L1;}
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->npar = __pyx_5;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":769 */
+  __pyx_3 = PyInt_AsLong(__pyx_v_n); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
+  __pyx_4 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; goto __pyx_L1;}
+  loess_setup(__pyx_v_x_dat,__pyx_v_y_dat,__pyx_3,__pyx_4,(&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base));
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":774 */
-  __pyx_5 = PyInt_AsLong(__pyx_v_n); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; goto __pyx_L1;}
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->nobs = __pyx_5;
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":776 */
-  __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_v_p, __pyx_2, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;}
-  __pyx_6 = __pyx_6 > 0;
-  Py_DECREF(__pyx_2); __pyx_2 = 0;
-  if (__pyx_6) {
-
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":777 */
-    __pyx_3 = PyNumber_Multiply(__pyx_v_n, __pyx_v_p); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;}
-    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;}
-    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
-    __pyx_3 = 0;
-    if (PyObject_SetAttr(((PyObject *)__pyx_v_x_ndr), __pyx_n_shape, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; goto __pyx_L1;}
-    Py_DECREF(__pyx_4); __pyx_4 = 0;
-    goto __pyx_L2;
-  }
-  __pyx_L2:;
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":779 */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  Py_INCREF(__pyx_v_y);
-  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_y);
-  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  Py_DECREF(__pyx_4); __pyx_4 = 0;
-  if (PyDict_SetItem(__pyx_3, __pyx_n_order, __pyx_n_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  Py_DECREF(__pyx_1); __pyx_1 = 0;
-  Py_DECREF(__pyx_2); __pyx_2 = 0;
-  Py_DECREF(__pyx_3); __pyx_3 = 0;
-  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
-  Py_DECREF(((PyObject *)__pyx_v_y_ndr));
-  __pyx_v_y_ndr = ((PyArrayObject *)__pyx_4);
-  __pyx_4 = 0;
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":780 */
-  __pyx_v_y_dat = ((double (*))__pyx_v_y_ndr->data);
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":781 */
-  __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_y_ndr), __pyx_n_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_1, __pyx_v_n, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; goto __pyx_L1;}
-  __pyx_6 = __pyx_6 != 0;
-  Py_DECREF(__pyx_1); __pyx_1 = 0;
-  if (__pyx_6) {
-
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":782 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; goto __pyx_L1;}
-    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
-    Py_INCREF(((PyObject *)__pyx_v_y_ndr));
-    PyTuple_SET_ITEM(__pyx_3, 0, ((PyObject *)__pyx_v_y_ndr));
-    Py_INCREF(__pyx_v_n);
-    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_n);
-    __pyx_4 = PyNumber_Remainder(__pyx_k110p, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
-    Py_DECREF(__pyx_3); __pyx_3 = 0;
-    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; goto __pyx_L1;}
-    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4);
-    __pyx_4 = 0;
-    __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; goto __pyx_L1;}
-    Py_DECREF(__pyx_2); __pyx_2 = 0;
-    Py_DECREF(__pyx_1); __pyx_1 = 0;
-    __Pyx_Raise(__pyx_3, 0, 0);
-    Py_DECREF(__pyx_3); __pyx_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; goto __pyx_L1;}
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":785 */
-  __pyx_5 = PyInt_AsLong(__pyx_v_n); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
-  __pyx_7 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
-  loess_setup(__pyx_v_x_dat,__pyx_v_y_dat,__pyx_5,__pyx_7,(&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base));
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":787 */
-  __pyx_4 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_inputs), 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_6_loess_loess_inputs)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
-  Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs));
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs = ((struct __pyx_obj_6_loess_loess_inputs *)__pyx_4);
-  __pyx_4 = 0;
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":788 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":771 */
   ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs->_base = (&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.inputs);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":790 */
-  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_model), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_6_loess_loess_model)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":773 */
+  __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_model), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6_loess_loess_model)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; goto __pyx_L1;}
   Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model));
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model = ((struct __pyx_obj_6_loess_loess_model *)__pyx_2);
-  __pyx_2 = 0;
+  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model = ((struct __pyx_obj_6_loess_loess_model *)__pyx_1);
+  __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":791 */
-  __pyx_5 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;}
-  __pyx_1 = ((struct __pyx_vtabstruct_6_loess_loess_model *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model->__pyx_vtab)->setup(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model,(&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.model),__pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;}
-  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":774 */
+  __pyx_3 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; goto __pyx_L1;}
+  __pyx_2 = ((struct __pyx_vtabstruct_6_loess_loess_model *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model->__pyx_vtab)->setup(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model,(&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.model),__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":795 */
-  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_control), 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6_loess_loess_control)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":776 */
+  __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_control), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6_loess_loess_control)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;}
   Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->control));
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->control = ((struct __pyx_obj_6_loess_loess_control *)__pyx_3);
-  __pyx_3 = 0;
+  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->control = ((struct __pyx_obj_6_loess_loess_control *)__pyx_1);
+  __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":796 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":777 */
   ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->control->_base = (&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.control);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":798 */
-  __pyx_4 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_kd_tree), 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_6_loess_loess_kd_tree)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":779 */
+  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_kd_tree), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_6_loess_loess_kd_tree)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; goto __pyx_L1;}
   Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->kd_tree));
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->kd_tree = ((struct __pyx_obj_6_loess_loess_kd_tree *)__pyx_4);
-  __pyx_4 = 0;
+  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->kd_tree = ((struct __pyx_obj_6_loess_loess_kd_tree *)__pyx_2);
+  __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":799 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":780 */
   ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->kd_tree->_base = (&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.kd_tree);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":801 */
-  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_outputs), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_6_loess_loess_outputs)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":782 */
+  __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_outputs), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_6_loess_loess_outputs)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; goto __pyx_L1;}
   Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs));
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs = ((struct __pyx_obj_6_loess_loess_outputs *)__pyx_2);
-  __pyx_2 = 0;
+  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs = ((struct __pyx_obj_6_loess_loess_outputs *)__pyx_1);
+  __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":802 */
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs->_base = (&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.outputs);
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":783 */
+  __pyx_4 = PyInt_AsLong(__pyx_v_n); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
+  __pyx_3 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
+  __pyx_2 = ((struct __pyx_vtabstruct_6_loess_loess_outputs *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs->__pyx_vtab)->setup(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs,(&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.outputs),__pyx_4,__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":803 */
-  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; goto __pyx_L1;}
-  __pyx_6 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; goto __pyx_L1;}
-  Py_DECREF(__pyx_1); __pyx_1 = 0;
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs->activated = __pyx_6;
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":804 */
-  __pyx_7 = PyInt_AsLong(__pyx_v_n); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;}
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs->nobs = __pyx_7;
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":805 */
-  __pyx_5 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; goto __pyx_L1;}
-  ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs->npar = __pyx_5;
-
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":807 */
-  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":785 */
+  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
   Py_DECREF(__pyx_v_modelopt);
-  __pyx_v_modelopt = __pyx_3;
-  __pyx_3 = 0;
+  __pyx_v_modelopt = __pyx_1;
+  __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":808 */
-  __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":786 */
+  __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; goto __pyx_L1;}
   Py_DECREF(__pyx_v_controlopt);
-  __pyx_v_controlopt = __pyx_4;
-  __pyx_4 = 0;
+  __pyx_v_controlopt = __pyx_2;
+  __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":809 */
-  __pyx_2 = PyObject_GetAttr(__pyx_v_options, __pyx_n_iteritems); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
-  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":787 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_iteritems); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetIter(__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_3 = PyObject_GetIter(__pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
-  Py_DECREF(__pyx_1); __pyx_1 = 0;
   for (;;) {
-    __pyx_4 = PyIter_Next(__pyx_3);
-    if (!__pyx_4) {
-      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
+    __pyx_2 = PyIter_Next(__pyx_1);
+    if (!__pyx_2) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
       break;
     }
-    __pyx_2 = PyObject_GetIter(__pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
-    Py_DECREF(__pyx_4); __pyx_4 = 0;
-    __pyx_1 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
+    __pyx_5 = PyObject_GetIter(__pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_2 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
     Py_DECREF(__pyx_v_k);
-    __pyx_v_k = __pyx_1;
-    __pyx_1 = 0;
-    __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
+    __pyx_v_k = __pyx_2;
+    __pyx_2 = 0;
+    __pyx_2 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
     Py_DECREF(__pyx_v_v);
-    __pyx_v_v = __pyx_4;
-    __pyx_4 = 0;
-    if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
-    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_v_v = __pyx_2;
+    __pyx_2 = 0;
+    if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; goto __pyx_L1;}
+    Py_DECREF(__pyx_5); __pyx_5 = 0;
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":810 */
-    __pyx_1 = PyTuple_New(6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":788 */
+    __pyx_2 = PyTuple_New(6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; goto __pyx_L1;}
     Py_INCREF(__pyx_n_family);
-    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_family);
+    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_family);
     Py_INCREF(__pyx_n_span);
-    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_span);
+    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_n_span);
     Py_INCREF(__pyx_n_degree);
-    PyTuple_SET_ITEM(__pyx_1, 2, __pyx_n_degree);
+    PyTuple_SET_ITEM(__pyx_2, 2, __pyx_n_degree);
     Py_INCREF(__pyx_n_normalize);
-    PyTuple_SET_ITEM(__pyx_1, 3, __pyx_n_normalize);
+    PyTuple_SET_ITEM(__pyx_2, 3, __pyx_n_normalize);
     Py_INCREF(__pyx_n_parametric);
-    PyTuple_SET_ITEM(__pyx_1, 4, __pyx_n_parametric);
+    PyTuple_SET_ITEM(__pyx_2, 4, __pyx_n_parametric);
     Py_INCREF(__pyx_n_drop_square);
-    PyTuple_SET_ITEM(__pyx_1, 5, __pyx_n_drop_square);
-    __pyx_6 = PySequence_Contains(__pyx_1, __pyx_v_k); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;}
-    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    PyTuple_SET_ITEM(__pyx_2, 5, __pyx_n_drop_square);
+    __pyx_6 = PySequence_Contains(__pyx_2, __pyx_v_k); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 788; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
     if (__pyx_6) {
 
-      /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":812 */
-      if (PyObject_SetItem(__pyx_v_modelopt, __pyx_v_k, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;}
-      goto __pyx_L6;
+      /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":790 */
+      if (PyObject_SetItem(__pyx_v_modelopt, __pyx_v_k, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; goto __pyx_L1;}
+      goto __pyx_L4;
     }
-    __pyx_4 = PyTuple_New(5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
+    __pyx_5 = PyTuple_New(5); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;}
     Py_INCREF(__pyx_n_surface);
-    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_n_surface);
+    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_n_surface);
     Py_INCREF(__pyx_n_statistics);
-    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_n_statistics);
+    PyTuple_SET_ITEM(__pyx_5, 1, __pyx_n_statistics);
     Py_INCREF(__pyx_n_trace_hat);
-    PyTuple_SET_ITEM(__pyx_4, 2, __pyx_n_trace_hat);
+    PyTuple_SET_ITEM(__pyx_5, 2, __pyx_n_trace_hat);
     Py_INCREF(__pyx_n_iterations);
-    PyTuple_SET_ITEM(__pyx_4, 3, __pyx_n_iterations);
+    PyTuple_SET_ITEM(__pyx_5, 3, __pyx_n_iterations);
     Py_INCREF(__pyx_n_cell);
-    PyTuple_SET_ITEM(__pyx_4, 4, __pyx_n_cell);
-    __pyx_6 = PySequence_Contains(__pyx_4, __pyx_v_k); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
-    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    PyTuple_SET_ITEM(__pyx_5, 4, __pyx_n_cell);
+    __pyx_6 = PySequence_Contains(__pyx_5, __pyx_v_k); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; goto __pyx_L1;}
+    Py_DECREF(__pyx_5); __pyx_5 = 0;
     if (__pyx_6) {
 
-      /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":815 */
-      if (PyObject_SetItem(__pyx_v_controlopt, __pyx_v_k, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
-      goto __pyx_L6;
+      /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":793 */
+      if (PyObject_SetItem(__pyx_v_controlopt, __pyx_v_k, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
+      goto __pyx_L4;
     }
-    __pyx_L6:;
+    __pyx_L4:;
   }
-  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":816 */
-  __pyx_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->control), __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
-  __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
-  __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_1, __pyx_v_controlopt); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":794 */
+  __pyx_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->control), __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;}
+  __pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;}
+  __pyx_1 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_5, __pyx_v_controlopt); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  Py_DECREF(__pyx_4); __pyx_4 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":817 */
-  __pyx_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model), __pyx_n_update); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
-  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
-  __pyx_1 = PyEval_CallObjectWithKeywords(__pyx_3, __pyx_2, __pyx_v_modelopt); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
-  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":795 */
+  __pyx_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model), __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
+  __pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
+  __pyx_1 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_5, __pyx_v_modelopt); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
   Py_DECREF(__pyx_1); __pyx_1 = 0;
 
   __pyx_r = 0;
@@ -3300,14 +3306,11 @@
   __pyx_L1:;
   Py_XDECREF(__pyx_1);
   Py_XDECREF(__pyx_2);
-  Py_XDECREF(__pyx_3);
-  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
   __Pyx_AddTraceback("_loess.loess.__init__");
   __pyx_r = -1;
   __pyx_L0:;
   Py_XDECREF(__pyx_v_options);
-  Py_DECREF(__pyx_v_x_ndr);
-  Py_DECREF(__pyx_v_y_ndr);
   Py_DECREF(__pyx_v_n);
   Py_DECREF(__pyx_v_p);
   Py_DECREF(__pyx_v_modelopt);
@@ -3324,6 +3327,7 @@
 }
 
 static PyObject *__pyx_f_6_loess_5loess_fit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6_loess_5loess_fit[] = "Computes the loess parameters on the current inputs and sets of parameters.";
 static PyObject *__pyx_f_6_loess_5loess_fit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_r;
   PyObject *__pyx_1 = 0;
@@ -3334,36 +3338,36 @@
   if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":820 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":799 */
   loess_fit((&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base));
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":821 */
-  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;}
-  __pyx_2 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":800 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
+  __pyx_2 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
   ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs->activated = __pyx_2;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":822 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":801 */
   __pyx_2 = ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.status.err_status;
   if (__pyx_2) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":823 */
-    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
-    __pyx_3 = PyString_FromString(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.status.err_msg); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
-    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":802 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
+    __pyx_3 = PyString_FromString(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.status.err_msg); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
     PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
     __pyx_3 = 0;
-    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
+    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
     Py_DECREF(__pyx_1); __pyx_1 = 0;
     Py_DECREF(__pyx_4); __pyx_4 = 0;
     __Pyx_Raise(__pyx_3, 0, 0);
     Py_DECREF(__pyx_3); __pyx_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":824 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":803 */
   __pyx_r = Py_None; Py_INCREF(Py_None);
   goto __pyx_L0;
 
@@ -3380,69 +3384,168 @@
   return __pyx_r;
 }
 
-static PyObject *__pyx_n_nobs;
+static PyObject *__pyx_n_str;
 
-static PyObject *__pyx_k122p;
-static PyObject *__pyx_k123p;
-static PyObject *__pyx_k125p;
-static PyObject *__pyx_k126p;
+static PyObject *__pyx_k104p;
 
-static char (__pyx_k122[]) = "Number of Observations         : %d";
-static char (__pyx_k123[]) = "Equivalent Number of Parameters: %.1f";
-static char (__pyx_k125[]) = "Residual Standard Error        : %.4f";
-static char (__pyx_k126[]) = "Residual Scale Estimate        : %.4f";
+static char (__pyx_k104[]) = "\n";
 
-static PyObject *__pyx_f_6_loess_5loess_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static PyObject *__pyx_f_6_loess_5loess_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_f_6_loess_5loess_input_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6_loess_5loess_input_summary[] = "Returns some generic information about the loess parameters.\n        ";
+static PyObject *__pyx_f_6_loess_5loess_input_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_toprint;
   PyObject *__pyx_r;
   PyObject *__pyx_1 = 0;
   PyObject *__pyx_2 = 0;
-  int __pyx_3;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
   static char *__pyx_argnames[] = {0};
   if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
   Py_INCREF(__pyx_v_self);
+  __pyx_v_toprint = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":827 */
-  __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs), __pyx_n_nobs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;}
-  __pyx_2 = PyNumber_Remainder(__pyx_k122p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":808 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs));
+  PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs));
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
-  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;}
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model));
+  PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model));
+  __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->control));
+  PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->control));
+  __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_1 = PyList_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
+  PyList_SET_ITEM(__pyx_1, 0, __pyx_3);
+  PyList_SET_ITEM(__pyx_1, 1, __pyx_4);
+  PyList_SET_ITEM(__pyx_1, 2, __pyx_5);
+  __pyx_3 = 0;
+  __pyx_4 = 0;
+  __pyx_5 = 0;
+  Py_DECREF(__pyx_v_toprint);
+  __pyx_v_toprint = __pyx_1;
+  __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":828 */
-  __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs), __pyx_n_enp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;}
-  __pyx_2 = PyNumber_Remainder(__pyx_k123p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":809 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k104p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_toprint);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_toprint);
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_r = __pyx_4;
+  __pyx_4 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  __Pyx_AddTraceback("_loess.loess.input_summary");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_toprint);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k105p;
+static PyObject *__pyx_k106p;
+static PyObject *__pyx_k107p;
+static PyObject *__pyx_k109p;
+static PyObject *__pyx_k110p;
+
+static char (__pyx_k105[]) = "Number of Observations         : %d";
+static char (__pyx_k106[]) = "Fit flag                       : %d";
+static char (__pyx_k107[]) = "Equivalent Number of Parameters: %.1f";
+static char (__pyx_k109[]) = "Residual Standard Error        : %.4f";
+static char (__pyx_k110[]) = "Residual Scale Estimate        : %.4f";
+
+static PyObject *__pyx_f_6_loess_5loess_output_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_6_loess_5loess_output_summary[] = "Returns some generic information about the loess fit.";
+static PyObject *__pyx_f_6_loess_5loess_output_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  int __pyx_4;
+  static char *__pyx_argnames[] = {0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":813 */
+  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs->nobs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k105p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;}
+  if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
-  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; goto __pyx_L1;}
+  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;}
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":829 */
-  __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model), __pyx_n_family); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_1, __pyx_n_gaussian, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;}
-  __pyx_3 = __pyx_3 == 0;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":814 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
+  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs->activated); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
   Py_DECREF(__pyx_1); __pyx_1 = 0;
-  if (__pyx_3) {
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_1 = PyNumber_Remainder(__pyx_k106p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (__Pyx_PrintItem(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":830 */
-    __pyx_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs), __pyx_n_s); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;}
-    __pyx_1 = PyNumber_Remainder(__pyx_k125p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":815 */
+  __pyx_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs), __pyx_n_enp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k107p, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":816 */
+  __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->model), __pyx_n_family); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_1, __pyx_n_gaussian, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+  __pyx_4 = __pyx_4 == 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":817 */
+    __pyx_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs), __pyx_n_s); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
+    __pyx_2 = PyNumber_Remainder(__pyx_k109p, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
-    if (__Pyx_PrintItem(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;}
-    Py_DECREF(__pyx_1); __pyx_1 = 0;
-    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; goto __pyx_L1;}
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
     goto __pyx_L2;
   }
   /*else*/ {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":832 */
-    __pyx_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs), __pyx_n_s); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
-    __pyx_1 = PyNumber_Remainder(__pyx_k126p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
-    Py_DECREF(__pyx_2); __pyx_2 = 0;
-    if (__Pyx_PrintItem(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":819 */
+    __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs), __pyx_n_s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; goto __pyx_L1;}
+    __pyx_3 = PyNumber_Remainder(__pyx_k110p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; goto __pyx_L1;}
     Py_DECREF(__pyx_1); __pyx_1 = 0;
-    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
+    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; goto __pyx_L1;}
   }
   __pyx_L2:;
 
@@ -3451,24 +3554,24 @@
   __pyx_L1:;
   Py_XDECREF(__pyx_1);
   Py_XDECREF(__pyx_2);
-  __Pyx_AddTraceback("_loess.loess.summary");
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("_loess.loess.output_summary");
   __pyx_r = 0;
   __pyx_L0:;
   Py_DECREF(__pyx_v_self);
   return __pyx_r;
 }
 
-static PyObject *__pyx_n_ravel;
 static PyObject *__pyx_n_divmod;
 
-static PyObject *__pyx_k131p;
-static PyObject *__pyx_k132p;
+static PyObject *__pyx_k115p;
+static PyObject *__pyx_k116p;
 
-static char (__pyx_k131[]) = "Can't predict without input data !";
-static char (__pyx_k132[]) = "Incompatible data size: there should be as many rows as parameters";
+static char (__pyx_k115[]) = "Can't predict without input data !";
+static char (__pyx_k116[]) = "Incompatible data size: there should be as many rows as parameters";
 
 static PyObject *__pyx_f_6_loess_5loess_predict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_6_loess_5loess_predict[] = "\n    newdata: ndarray\n        A (m,p) ndarray specifying the values of the predictors at which the \n        evaluation is to be carried out.\n    stderr: Boolean\n        Logical flag for computing standard errors at newdata.\n        ";
+static char __pyx_doc_6_loess_5loess_predict[] = "Computes loess estimates at the given new data points newdata. Returns\na loess_predicted object, whose attributes are described below.\n        \n:Parameters:\n    newdata : ndarray\n        The (m,p) array of independent variables where the surface must be estimated,\n        with m the number of new data points, and p the number of independent\n        variables.\n    stderror : boolean\n        Whether the standard error should be computed\n        \n:Returns:\n    A new loess_predicted object, consisting of:\n    values : ndarray\n        The (m,) ndarray of loess values evaluated at newdata\n    stderr : ndarray\n        The (m,) ndarray of the estimates of the standard error on the estimated\n        values.\n    residual_scale : float\n        Estimate of the scale of the residuals\n    df : integer\n        Degrees of freedom of the t-distribution used to compute pointwise \n        confidence intervals for the evaluated surface.\n    nest : integer\n        Number of new observations.\n        ";
 static PyObject *__pyx_f_6_loess_5loess_predict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_newdata = 0;
   PyObject *__pyx_v_stderror = 0;
@@ -3484,7 +3587,7 @@
   PyObject *__pyx_4 = 0;
   PyObject *__pyx_5 = 0;
   static char *__pyx_argnames[] = {"newdata","stderror",0};
-  __pyx_v_stderror = __pyx_k34;
+  __pyx_v_stderror = __pyx_k11;
   if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_newdata, &__pyx_v_stderror)) return 0;
   Py_INCREF(__pyx_v_self);
   Py_INCREF(__pyx_v_newdata);
@@ -3492,35 +3595,35 @@
   __pyx_v_p_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
   __pyx_v_notOK = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":847 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":853 */
   __pyx_1 = (((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs->activated == 0);
   if (__pyx_1) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":848 */
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":854 */
     loess_fit((&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base));
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":849 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;}
-    __pyx_1 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":855 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; goto __pyx_L1;}
+    __pyx_1 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->outputs->activated = __pyx_1;
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":850 */
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":856 */
     __pyx_1 = ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.status.err_status;
     if (__pyx_1) {
 
-      /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":851 */
-      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;}
-      __pyx_3 = PyString_FromString(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.status.err_msg); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;}
-      __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;}
+      /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":857 */
+      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;}
+      __pyx_3 = PyString_FromString(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.status.err_msg); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;}
+      __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;}
       PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
       __pyx_3 = 0;
-      __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;}
+      __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;}
       Py_DECREF(__pyx_2); __pyx_2 = 0;
       Py_DECREF(__pyx_4); __pyx_4 = 0;
       __Pyx_Raise(__pyx_3, 0, 0);
       Py_DECREF(__pyx_3); __pyx_3 = 0;
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;}
       goto __pyx_L3;
     }
     __pyx_L3:;
@@ -3528,147 +3631,147 @@
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":853 */
-  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
-  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":859 */
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
   Py_INCREF(__pyx_v_newdata);
   PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_newdata);
-  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
-  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
+  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
-  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
-  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
-  if (PyDict_SetItem(__pyx_3, __pyx_n_order, __pyx_n_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
-  __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_4, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_order, __pyx_n_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
+  __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_4, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_4); __pyx_4 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_2 = PyObject_GetAttr(__pyx_5, __pyx_n_ravel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_5, __pyx_n_ravel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
-  __pyx_4 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
-  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
   Py_DECREF(((PyObject *)__pyx_v_p_ndr));
   __pyx_v_p_ndr = ((PyArrayObject *)__pyx_4);
   __pyx_4 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":854 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":860 */
   __pyx_v_p_dat = ((double (*))__pyx_v_p_ndr->data);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":856 */
-  __pyx_3 = PyObject_GetAttr(((PyObject *)__pyx_v_p_ndr), __pyx_n_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; goto __pyx_L1;}
-  __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_3, __pyx_5, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":862 */
+  __pyx_3 = PyObject_GetAttr(((PyObject *)__pyx_v_p_ndr), __pyx_n_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
+  __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_3, __pyx_5, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
   __pyx_1 = __pyx_1 == 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   Py_DECREF(__pyx_5); __pyx_5 = 0;
   if (__pyx_1) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":857 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;}
-    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;}
-    Py_INCREF(__pyx_k131p);
-    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k131p);
-    __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":863 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; goto __pyx_L1;}
+    Py_INCREF(__pyx_k115p);
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k115p);
+    __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_4); __pyx_4 = 0;
     __Pyx_Raise(__pyx_3, 0, 0);
     Py_DECREF(__pyx_3); __pyx_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; goto __pyx_L1;}
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":858 */
-  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_divmod); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
-  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
-  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":864 */
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_divmod); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
   Py_INCREF(((PyObject *)__pyx_v_p_ndr));
   PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_p_ndr));
-  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->npar); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
-  __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
+  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->inputs->npar); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
   PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
   __pyx_3 = 0;
   __pyx_2 = 0;
-  __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
   Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_2 = PyObject_GetIter(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetIter(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_5 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
-  __pyx_1 = PyInt_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
+  __pyx_5 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
+  __pyx_1 = PyInt_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
   Py_DECREF(__pyx_5); __pyx_5 = 0;
   __pyx_v_m = __pyx_1;
-  __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
+  __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
   Py_DECREF(__pyx_v_notOK);
   __pyx_v_notOK = __pyx_4;
   __pyx_4 = 0;
-  if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; goto __pyx_L1;}
+  if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":859 */
-  __pyx_1 = PyObject_IsTrue(__pyx_v_notOK); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":865 */
+  __pyx_1 = PyObject_IsTrue(__pyx_v_notOK); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; goto __pyx_L1;}
   if (__pyx_1) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":860 */
-    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; goto __pyx_L1;}
-    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; goto __pyx_L1;}
-    Py_INCREF(__pyx_k132p);
-    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k132p);
-    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":866 */
+    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
+    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
+    Py_INCREF(__pyx_k116p);
+    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k116p);
+    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
     Py_DECREF(__pyx_3); __pyx_3 = 0;
     Py_DECREF(__pyx_5); __pyx_5 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
     goto __pyx_L5;
   }
   __pyx_L5:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":863 */
-  __pyx_1 = PyInt_AsLong(__pyx_v_stderror); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":869 */
+  __pyx_1 = PyInt_AsLong(__pyx_v_stderror); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; goto __pyx_L1;}
   predict(__pyx_v_p_dat,__pyx_v_m,(&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base),(&__pyx_v__prediction),__pyx_1);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":864 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":870 */
   __pyx_1 = ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.status.err_status;
   if (__pyx_1) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":865 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; goto __pyx_L1;}
-    __pyx_3 = PyString_FromString(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.status.err_msg); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; goto __pyx_L1;}
-    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":871 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
+    __pyx_3 = PyString_FromString(((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base.status.err_msg); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
+    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
     PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
     __pyx_3 = 0;
-    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; goto __pyx_L1;}
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_5); __pyx_5 = 0;
     __Pyx_Raise(__pyx_4, 0, 0);
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;}
     goto __pyx_L6;
   }
   __pyx_L6:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":866 */
-  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_predicted), 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
-  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6_loess_loess_predicted)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":872 */
+  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_6_loess_loess_predicted), 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_6_loess_loess_predicted)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; goto __pyx_L1;}
   Py_DECREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->predicted));
   ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->predicted = ((struct __pyx_obj_6_loess_loess_predicted *)__pyx_3);
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":867 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":873 */
   ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->predicted->_base = __pyx_v__prediction;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":868 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":874 */
   ((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->predicted->nest = __pyx_v_m;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":870 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":876 */
   Py_INCREF(((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->predicted));
   __pyx_r = ((PyObject *)((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->predicted);
   goto __pyx_L0;
@@ -3695,7 +3798,7 @@
 static void __pyx_f_6_loess_5loess___dealloc__(PyObject *__pyx_v_self) {
   Py_INCREF(__pyx_v_self);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":873 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":879 */
   loess_free_mem((&((struct __pyx_obj_6_loess_loess *)__pyx_v_self)->_base));
 
   Py_DECREF(__pyx_v_self);
@@ -3706,9 +3809,9 @@
 static PyObject *__pyx_n_outputs;
 static PyObject *__pyx_n_abs;
 
-static PyObject *__pyx_k133p;
+static PyObject *__pyx_k117p;
 
-static char (__pyx_k133[]) = "Arguments should be valid loess objects!got '%s' instead";
+static char (__pyx_k117[]) = "Arguments should be valid loess objects!got '%s' instead";
 
 static int __pyx_f_6_loess_5anova___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 static int __pyx_f_6_loess_5anova___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
@@ -3745,208 +3848,208 @@
   __pyx_v_out_two = Py_None; Py_INCREF(Py_None);
   __pyx_v_F_value = Py_None; Py_INCREF(Py_None);
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":887 */
-  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
-  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":893 */
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
   Py_INCREF(__pyx_v_loess_one);
   PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_loess_one);
   Py_INCREF(((PyObject*)__pyx_ptype_6_loess_loess));
   PyTuple_SET_ITEM(__pyx_3, 1, ((PyObject*)__pyx_ptype_6_loess_loess));
-  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
-  __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
+  __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
   Py_DECREF(__pyx_4); __pyx_4 = 0;
   __pyx_1 = (!__pyx_5);
   if (!__pyx_1) {
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
-    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
     Py_INCREF(__pyx_v_loess_two);
     PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_loess_two);
     Py_INCREF(((PyObject*)__pyx_ptype_6_loess_loess));
     PyTuple_SET_ITEM(__pyx_3, 1, ((PyObject*)__pyx_ptype_6_loess_loess));
-    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_3); __pyx_3 = 0;
-    __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
+    __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
     Py_DECREF(__pyx_4); __pyx_4 = 0;
     __pyx_1 = (!__pyx_5);
   }
   if (__pyx_1) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":888 */
-    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
-    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;}
-    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;}
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":894 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
+    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
     Py_INCREF(__pyx_v_loess_one);
     PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_loess_one);
-    __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;}
+    __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
     Py_DECREF(__pyx_3); __pyx_3 = 0;
     Py_DECREF(__pyx_4); __pyx_4 = 0;
-    __pyx_3 = PyNumber_Remainder(__pyx_k133p, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;}
+    __pyx_3 = PyNumber_Remainder(__pyx_k117p, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
     Py_DECREF(__pyx_6); __pyx_6 = 0;
-    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
     PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
     __pyx_3 = 0;
-    __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+    __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
     Py_DECREF(__pyx_2); __pyx_2 = 0;
     Py_DECREF(__pyx_4); __pyx_4 = 0;
     __Pyx_Raise(__pyx_6, 0, 0);
     Py_DECREF(__pyx_6); __pyx_6 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
     goto __pyx_L2;
   }
   __pyx_L2:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":891 */
-  __pyx_3 = PyObject_GetAttr(__pyx_v_loess_one, __pyx_n_outputs); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":897 */
+  __pyx_3 = PyObject_GetAttr(__pyx_v_loess_one, __pyx_n_outputs); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;}
   Py_DECREF(__pyx_v_out_one);
   __pyx_v_out_one = __pyx_3;
   __pyx_3 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":892 */
-  __pyx_2 = PyObject_GetAttr(__pyx_v_loess_two, __pyx_n_outputs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":898 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_loess_two, __pyx_n_outputs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
   Py_DECREF(__pyx_v_out_two);
   __pyx_v_out_two = __pyx_2;
   __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":894 */
-  __pyx_4 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_one_delta); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
-  __pyx_7 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":900 */
+  __pyx_4 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_one_delta); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
   Py_DECREF(__pyx_4); __pyx_4 = 0;
   __pyx_v_one_d1 = __pyx_7;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":895 */
-  __pyx_6 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_two_delta); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
-  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":901 */
+  __pyx_6 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_two_delta); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
   __pyx_v_one_d2 = __pyx_7;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":896 */
-  __pyx_3 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_s); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; goto __pyx_L1;}
-  __pyx_7 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":902 */
+  __pyx_3 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_s); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   __pyx_v_one_s = __pyx_7;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":898 */
-  __pyx_2 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_one_delta); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
-  __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":904 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_one_delta); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   __pyx_v_two_d1 = __pyx_7;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":899 */
-  __pyx_4 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_two_delta); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
-  __pyx_7 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":905 */
+  __pyx_4 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_two_delta); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; goto __pyx_L1;}
   Py_DECREF(__pyx_4); __pyx_4 = 0;
   __pyx_v_two_d2 = __pyx_7;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":900 */
-  __pyx_6 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_s); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
-  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":906 */
+  __pyx_6 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_s); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
   __pyx_v_two_s = __pyx_7;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":902 */
-  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
-  __pyx_2 = PyFloat_FromDouble((((__pyx_v_one_s * __pyx_v_one_s) * __pyx_v_one_d1) - ((__pyx_v_two_s * __pyx_v_two_s) * __pyx_v_two_d1))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
-  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":908 */
+  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;}
+  __pyx_2 = PyFloat_FromDouble((((__pyx_v_one_s * __pyx_v_one_s) * __pyx_v_one_d1) - ((__pyx_v_two_s * __pyx_v_two_s) * __pyx_v_two_d1))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
   __pyx_2 = 0;
-  __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
+  __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
   __pyx_v_rssdiff = __pyx_7;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":903 */
-  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; goto __pyx_L1;}
-  __pyx_3 = PyFloat_FromDouble((__pyx_v_one_d1 - __pyx_v_two_d1)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; goto __pyx_L1;}
-  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":909 */
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;}
+  __pyx_3 = PyFloat_FromDouble((__pyx_v_one_d1 - __pyx_v_two_d1)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
   __pyx_3 = 0;
-  __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; goto __pyx_L1;}
+  __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
   __pyx_v_d1diff = __pyx_7;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":904 */
-  __pyx_3 = PyFloat_FromDouble((__pyx_v_d1diff * __pyx_v_d1diff)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
-  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
-  __pyx_4 = PyFloat_FromDouble((__pyx_v_one_d2 - __pyx_v_two_d2)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
-  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":910 */
+  __pyx_3 = PyFloat_FromDouble((__pyx_v_d1diff * __pyx_v_d1diff)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
+  __pyx_4 = PyFloat_FromDouble((__pyx_v_one_d2 - __pyx_v_two_d2)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
+  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
   PyTuple_SET_ITEM(__pyx_6, 0, __pyx_4);
   __pyx_4 = 0;
-  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   Py_DECREF(__pyx_6); __pyx_6 = 0;
-  __pyx_2 = PyNumber_Divide(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Divide(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
   ((struct __pyx_obj_6_loess_anova *)__pyx_v_self)->dfn = __pyx_7;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":905 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":911 */
   __pyx_v_df1 = ((struct __pyx_obj_6_loess_anova *)__pyx_v_self)->dfn;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":907 */
-  __pyx_6 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_enp); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
-  __pyx_3 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_enp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
-  if (PyObject_Cmp(__pyx_6, __pyx_3, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":913 */
+  __pyx_6 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_enp); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_enp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_6, __pyx_3, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;}
   __pyx_5 = __pyx_5 > 0;
   Py_DECREF(__pyx_6); __pyx_6 = 0;
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   if (__pyx_5) {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":908 */
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":914 */
     ((struct __pyx_obj_6_loess_anova *)__pyx_v_self)->dfd = ((__pyx_v_one_d1 * __pyx_v_one_d1) / __pyx_v_one_d2);
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":909 */
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":915 */
     __pyx_v_tmp = __pyx_v_one_s;
     goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":911 */
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":917 */
     ((struct __pyx_obj_6_loess_anova *)__pyx_v_self)->dfd = ((__pyx_v_two_d1 * __pyx_v_two_d1) / __pyx_v_two_d2);
 
-    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":912 */
+    /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":918 */
     __pyx_v_tmp = __pyx_v_two_s;
   }
   __pyx_L3:;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":913 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":919 */
   __pyx_v_df2 = ((struct __pyx_obj_6_loess_anova *)__pyx_v_self)->dfd;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":914 */
-  __pyx_4 = PyFloat_FromDouble(((__pyx_v_rssdiff / __pyx_v_d1diff) / (__pyx_v_tmp * __pyx_v_tmp))); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":920 */
+  __pyx_4 = PyFloat_FromDouble(((__pyx_v_rssdiff / __pyx_v_d1diff) / (__pyx_v_tmp * __pyx_v_tmp))); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; goto __pyx_L1;}
   Py_DECREF(__pyx_v_F_value);
   __pyx_v_F_value = __pyx_4;
   __pyx_4 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":916 */
-  __pyx_2 = PyFloat_FromDouble(__pyx_v_df1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
-  __pyx_6 = PyNumber_Multiply(__pyx_v_F_value, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":922 */
+  __pyx_2 = PyFloat_FromDouble(__pyx_v_df1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+  __pyx_6 = PyNumber_Multiply(__pyx_v_F_value, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_3 = PyFloat_FromDouble(__pyx_v_df2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
-  __pyx_4 = PyFloat_FromDouble(__pyx_v_df1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
-  __pyx_2 = PyNumber_Multiply(__pyx_v_F_value, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
+  __pyx_3 = PyFloat_FromDouble(__pyx_v_df2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+  __pyx_4 = PyFloat_FromDouble(__pyx_v_df1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Multiply(__pyx_v_F_value, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
   Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_4 = PyNumber_Add(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Add(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   Py_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_3 = PyNumber_Divide(__pyx_6, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
+  __pyx_3 = PyNumber_Divide(__pyx_6, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
   Py_DECREF(__pyx_6); __pyx_6 = 0;
   Py_DECREF(__pyx_4); __pyx_4 = 0;
-  __pyx_7 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
   Py_DECREF(__pyx_3); __pyx_3 = 0;
   ((struct __pyx_obj_6_loess_anova *)__pyx_v_self)->Pr_F = (1. - ibeta(__pyx_7,(__pyx_v_df1 / 2),(__pyx_v_df2 / 2)));
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":917 */
-  __pyx_7 = PyFloat_AsDouble(__pyx_v_F_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; goto __pyx_L1;}
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":923 */
+  __pyx_7 = PyFloat_AsDouble(__pyx_v_F_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;}
   ((struct __pyx_obj_6_loess_anova *)__pyx_v_self)->F_value = __pyx_7;
 
   __pyx_r = 0;
@@ -3998,9 +4101,9 @@
   {&__pyx_n_family, "family"},
   {&__pyx_n_fitted_residuals, "fitted_residuals"},
   {&__pyx_n_fitted_values, "fitted_values"},
+  {&__pyx_n_float_, "float_"},
   {&__pyx_n_gaussian, "gaussian"},
   {&__pyx_n_get, "get"},
-  {&__pyx_n_id, "id"},
   {&__pyx_n_interpolate, "interpolate"},
   {&__pyx_n_isinstance, "isinstance"},
   {&__pyx_n_iterations, "iterations"},
@@ -4011,10 +4114,10 @@
   {&__pyx_n_min, "min"},
   {&__pyx_n_narray, "narray"},
   {&__pyx_n_ndim, "ndim"},
-  {&__pyx_n_nobs, "nobs"},
   {&__pyx_n_normalize, "normalize"},
   {&__pyx_n_numpy, "numpy"},
   {&__pyx_n_one_delta, "one_delta"},
+  {&__pyx_n_ones, "ones"},
   {&__pyx_n_order, "order"},
   {&__pyx_n_outputs, "outputs"},
   {&__pyx_n_parametric, "parametric"},
@@ -4028,6 +4131,7 @@
   {&__pyx_n_span, "span"},
   {&__pyx_n_statistics, "statistics"},
   {&__pyx_n_stderr, "stderr"},
+  {&__pyx_n_str, "str"},
   {&__pyx_n_subok, "subok"},
   {&__pyx_n_surface, "surface"},
   {&__pyx_n_symmetric, "symmetric"},
@@ -4040,23 +4144,33 @@
 };
 
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
-  {&__pyx_k35p, __pyx_k35, sizeof(__pyx_k35)},
+  {&__pyx_k22p, __pyx_k22, sizeof(__pyx_k22)},
+  {&__pyx_k26p, __pyx_k26, sizeof(__pyx_k26)},
+  {&__pyx_k29p, __pyx_k29, sizeof(__pyx_k29)},
+  {&__pyx_k30p, __pyx_k30, sizeof(__pyx_k30)},
+  {&__pyx_k33p, __pyx_k33, sizeof(__pyx_k33)},
+  {&__pyx_k36p, __pyx_k36, sizeof(__pyx_k36)},
+  {&__pyx_k37p, __pyx_k37, sizeof(__pyx_k37)},
   {&__pyx_k38p, __pyx_k38, sizeof(__pyx_k38)},
-  {&__pyx_k39p, __pyx_k39, sizeof(__pyx_k39)},
-  {&__pyx_k42p, __pyx_k42, sizeof(__pyx_k42)},
+  {&__pyx_k44p, __pyx_k44, sizeof(__pyx_k44)},
   {&__pyx_k45p, __pyx_k45, sizeof(__pyx_k45)},
   {&__pyx_k46p, __pyx_k46, sizeof(__pyx_k46)},
   {&__pyx_k47p, __pyx_k47, sizeof(__pyx_k47)},
-  {&__pyx_k53p, __pyx_k53, sizeof(__pyx_k53)},
-  {&__pyx_k54p, __pyx_k54, sizeof(__pyx_k54)},
+  {&__pyx_k48p, __pyx_k48, sizeof(__pyx_k48)},
+  {&__pyx_k49p, __pyx_k49, sizeof(__pyx_k49)},
+  {&__pyx_k50p, __pyx_k50, sizeof(__pyx_k50)},
+  {&__pyx_k51p, __pyx_k51, sizeof(__pyx_k51)},
+  {&__pyx_k52p, __pyx_k52, sizeof(__pyx_k52)},
   {&__pyx_k55p, __pyx_k55, sizeof(__pyx_k55)},
-  {&__pyx_k56p, __pyx_k56, sizeof(__pyx_k56)},
-  {&__pyx_k57p, __pyx_k57, sizeof(__pyx_k57)},
-  {&__pyx_k58p, __pyx_k58, sizeof(__pyx_k58)},
-  {&__pyx_k59p, __pyx_k59, sizeof(__pyx_k59)},
-  {&__pyx_k60p, __pyx_k60, sizeof(__pyx_k60)},
-  {&__pyx_k61p, __pyx_k61, sizeof(__pyx_k61)},
-  {&__pyx_k64p, __pyx_k64, sizeof(__pyx_k64)},
+  {&__pyx_k68p, __pyx_k68, sizeof(__pyx_k68)},
+  {&__pyx_k69p, __pyx_k69, sizeof(__pyx_k69)},
+  {&__pyx_k70p, __pyx_k70, sizeof(__pyx_k70)},
+  {&__pyx_k71p, __pyx_k71, sizeof(__pyx_k71)},
+  {&__pyx_k72p, __pyx_k72, sizeof(__pyx_k72)},
+  {&__pyx_k73p, __pyx_k73, sizeof(__pyx_k73)},
+  {&__pyx_k74p, __pyx_k74, sizeof(__pyx_k74)},
+  {&__pyx_k75p, __pyx_k75, sizeof(__pyx_k75)},
+  {&__pyx_k76p, __pyx_k76, sizeof(__pyx_k76)},
   {&__pyx_k77p, __pyx_k77, sizeof(__pyx_k77)},
   {&__pyx_k78p, __pyx_k78, sizeof(__pyx_k78)},
   {&__pyx_k79p, __pyx_k79, sizeof(__pyx_k79)},
@@ -4073,51 +4187,82 @@
   {&__pyx_k90p, __pyx_k90, sizeof(__pyx_k90)},
   {&__pyx_k91p, __pyx_k91, sizeof(__pyx_k91)},
   {&__pyx_k92p, __pyx_k92, sizeof(__pyx_k92)},
-  {&__pyx_k93p, __pyx_k93, sizeof(__pyx_k93)},
-  {&__pyx_k94p, __pyx_k94, sizeof(__pyx_k94)},
-  {&__pyx_k95p, __pyx_k95, sizeof(__pyx_k95)},
-  {&__pyx_k96p, __pyx_k96, sizeof(__pyx_k96)},
-  {&__pyx_k97p, __pyx_k97, sizeof(__pyx_k97)},
-  {&__pyx_k98p, __pyx_k98, sizeof(__pyx_k98)},
-  {&__pyx_k99p, __pyx_k99, sizeof(__pyx_k99)},
-  {&__pyx_k100p, __pyx_k100, sizeof(__pyx_k100)},
-  {&__pyx_k101p, __pyx_k101, sizeof(__pyx_k101)},
+  {&__pyx_k104p, __pyx_k104, sizeof(__pyx_k104)},
+  {&__pyx_k105p, __pyx_k105, sizeof(__pyx_k105)},
+  {&__pyx_k106p, __pyx_k106, sizeof(__pyx_k106)},
+  {&__pyx_k107p, __pyx_k107, sizeof(__pyx_k107)},
+  {&__pyx_k109p, __pyx_k109, sizeof(__pyx_k109)},
   {&__pyx_k110p, __pyx_k110, sizeof(__pyx_k110)},
-  {&__pyx_k122p, __pyx_k122, sizeof(__pyx_k122)},
-  {&__pyx_k123p, __pyx_k123, sizeof(__pyx_k123)},
-  {&__pyx_k125p, __pyx_k125, sizeof(__pyx_k125)},
-  {&__pyx_k126p, __pyx_k126, sizeof(__pyx_k126)},
-  {&__pyx_k131p, __pyx_k131, sizeof(__pyx_k131)},
-  {&__pyx_k132p, __pyx_k132, sizeof(__pyx_k132)},
-  {&__pyx_k133p, __pyx_k133, sizeof(__pyx_k133)},
+  {&__pyx_k115p, __pyx_k115, sizeof(__pyx_k115)},
+  {&__pyx_k116p, __pyx_k116, sizeof(__pyx_k116)},
+  {&__pyx_k117p, __pyx_k117, sizeof(__pyx_k117)},
   {0, 0, 0}
 };
 
 static PyObject *__pyx_tp_new_6_loess_loess_inputs(PyTypeObject *t, PyObject *a, PyObject *k) {
   PyObject *o = (*t->tp_alloc)(t, 0);
+  struct __pyx_obj_6_loess_loess_inputs *p = (struct __pyx_obj_6_loess_loess_inputs *)o;
+  p->w_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->x = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->y = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->masked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->x_eff = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->y_eff = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
   return o;
 }
 
 static void __pyx_tp_dealloc_6_loess_loess_inputs(PyObject *o) {
+  struct __pyx_obj_6_loess_loess_inputs *p = (struct __pyx_obj_6_loess_loess_inputs *)o;
+  Py_XDECREF(((PyObject *)p->w_ndr));
+  Py_XDECREF(((PyObject *)p->x));
+  Py_XDECREF(((PyObject *)p->y));
+  Py_XDECREF(((PyObject *)p->masked));
+  Py_XDECREF(((PyObject *)p->x_eff));
+  Py_XDECREF(((PyObject *)p->y_eff));
   (*o->ob_type->tp_free)(o);
 }
 
 static int __pyx_tp_traverse_6_loess_loess_inputs(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_6_loess_loess_inputs *p = (struct __pyx_obj_6_loess_loess_inputs *)o;
+  if (p->w_ndr) {
+    e = (*v)(((PyObject*)p->w_ndr), a); if (e) return e;
+  }
+  if (p->x) {
+    e = (*v)(((PyObject*)p->x), a); if (e) return e;
+  }
+  if (p->y) {
+    e = (*v)(((PyObject*)p->y), a); if (e) return e;
+  }
+  if (p->masked) {
+    e = (*v)(((PyObject*)p->masked), a); if (e) return e;
+  }
+  if (p->x_eff) {
+    e = (*v)(((PyObject*)p->x_eff), a); if (e) return e;
+  }
+  if (p->y_eff) {
+    e = (*v)(((PyObject*)p->y_eff), a); if (e) return e;
+  }
   return 0;
 }
 
 static int __pyx_tp_clear_6_loess_loess_inputs(PyObject *o) {
+  struct __pyx_obj_6_loess_loess_inputs *p = (struct __pyx_obj_6_loess_loess_inputs *)o;
+  Py_XDECREF(((PyObject *)p->w_ndr));
+  p->w_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->x));
+  p->x = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->y));
+  p->y = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->masked));
+  p->masked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->x_eff));
+  p->x_eff = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->y_eff));
+  p->y_eff = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
   return 0;
 }
 
-static PyObject *__pyx_getprop_6_loess_12loess_inputs_x(PyObject *o, void *x) {
-  return __pyx_f_6_loess_12loess_inputs_1x___get__(o);
-}
-
-static PyObject *__pyx_getprop_6_loess_12loess_inputs_y(PyObject *o, void *x) {
-  return __pyx_f_6_loess_12loess_inputs_1y___get__(o);
-}
-
 static PyObject *__pyx_getprop_6_loess_12loess_inputs_weights(PyObject *o, void *x) {
   return __pyx_f_6_loess_12loess_inputs_7weights___get__(o);
 }
@@ -4132,24 +4277,23 @@
   }
 }
 
-static PyObject *__pyx_getprop_6_loess_12loess_inputs_nobs(PyObject *o, void *x) {
-  return __pyx_f_6_loess_12loess_inputs_4nobs___get__(o);
-}
-
-static PyObject *__pyx_getprop_6_loess_12loess_inputs_npar(PyObject *o, void *x) {
-  return __pyx_f_6_loess_12loess_inputs_4npar___get__(o);
-}
-
 static struct PyMethodDef __pyx_methods_6_loess_loess_inputs[] = {
   {0, 0, 0, 0}
 };
 
+static struct PyMemberDef __pyx_members_6_loess_loess_inputs[] = {
+  {"x", T_OBJECT, offsetof(struct __pyx_obj_6_loess_loess_inputs, x), READONLY, 0},
+  {"y", T_OBJECT, offsetof(struct __pyx_obj_6_loess_loess_inputs, y), READONLY, 0},
+  {"masked", T_OBJECT, offsetof(struct __pyx_obj_6_loess_loess_inputs, masked), READONLY, 0},
+  {"x_eff", T_OBJECT, offsetof(struct __pyx_obj_6_loess_loess_inputs, x_eff), READONLY, 0},
+  {"y_eff", T_OBJECT, offsetof(struct __pyx_obj_6_loess_loess_inputs, y_eff), READONLY, 0},
+  {"nobs", T_INT, offsetof(struct __pyx_obj_6_loess_loess_inputs, nobs), READONLY, 0},
+  {"npar", T_INT, offsetof(struct __pyx_obj_6_loess_loess_inputs, npar), READONLY, 0},
+  {0, 0, 0, 0, 0}
+};
+
 static struct PyGetSetDef __pyx_getsets_6_loess_loess_inputs[] = {
-  {"x", __pyx_getprop_6_loess_12loess_inputs_x, 0, 0, 0},
-  {"y", __pyx_getprop_6_loess_12loess_inputs_y, 0, 0, 0},
   {"weights", __pyx_getprop_6_loess_12loess_inputs_weights, __pyx_setprop_6_loess_12loess_inputs_weights, __pyx_k1, 0},
-  {"nobs", __pyx_getprop_6_loess_12loess_inputs_nobs, 0, __pyx_k2, 0},
-  {"npar", __pyx_getprop_6_loess_12loess_inputs_npar, 0, __pyx_k3, 0},
   {0, 0, 0, 0, 0}
 };
 
@@ -4242,7 +4386,7 @@
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_loess_inputs, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
+  "Loess inputs\n    \n:IVariables:\n    x : ndarray\n        A (n,p) ndarray of independent variables, with n the number of observations\n        and p the number of variables.\n    y : ndarray\n        A (n,) ndarray of observations\n    nobs : integer\n        Number of observations: nobs=n.\n    npar : integer\n        Number of independent variables: npar=p.\n    weights : ndarray\n        A (n,) ndarray of weights to be given to individual observations in the \n        sum of squared residuals that forms the local fitting criterion. If not\n        None, the weights should be non negative. If the different observations\n        have non-equal variances, the weights should be inversely proportional \n        to the variances.\n        By default, an unweighted fit is carried out (all the weights are one).\n    ", /*tp_doc*/
   __pyx_tp_traverse_6_loess_loess_inputs, /*tp_traverse*/
   __pyx_tp_clear_6_loess_loess_inputs, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -4250,14 +4394,14 @@
   0, /*tp_iter*/
   0, /*tp_iternext*/
   __pyx_methods_6_loess_loess_inputs, /*tp_methods*/
-  0, /*tp_members*/
+  __pyx_members_6_loess_loess_inputs, /*tp_members*/
   __pyx_getsets_6_loess_loess_inputs, /*tp_getset*/
   0, /*tp_base*/
   0, /*tp_dict*/
   0, /*tp_descr_get*/
   0, /*tp_descr_set*/
   0, /*tp_dictoffset*/
-  0, /*tp_init*/
+  __pyx_f_6_loess_12loess_inputs___init__, /*tp_init*/
   0, /*tp_alloc*/
   __pyx_tp_new_6_loess_loess_inputs, /*tp_new*/
   0, /*tp_free*/
@@ -4362,11 +4506,11 @@
 };
 
 static struct PyGetSetDef __pyx_getsets_6_loess_loess_control[] = {
-  {"surface", __pyx_getprop_6_loess_13loess_control_surface, __pyx_setprop_6_loess_13loess_control_surface, __pyx_k4, 0},
-  {"statistics", __pyx_getprop_6_loess_13loess_control_statistics, __pyx_setprop_6_loess_13loess_control_statistics, __pyx_k5, 0},
-  {"trace_hat", __pyx_getprop_6_loess_13loess_control_trace_hat, __pyx_setprop_6_loess_13loess_control_trace_hat, __pyx_k6, 0},
-  {"iterations", __pyx_getprop_6_loess_13loess_control_iterations, __pyx_setprop_6_loess_13loess_control_iterations, __pyx_k7, 0},
-  {"cell", __pyx_getprop_6_loess_13loess_control_cell, __pyx_setprop_6_loess_13loess_control_cell, __pyx_k8, 0},
+  {"surface", __pyx_getprop_6_loess_13loess_control_surface, __pyx_setprop_6_loess_13loess_control_surface, __pyx_k2, 0},
+  {"statistics", __pyx_getprop_6_loess_13loess_control_statistics, __pyx_setprop_6_loess_13loess_control_statistics, __pyx_k3, 0},
+  {"trace_hat", __pyx_getprop_6_loess_13loess_control_trace_hat, __pyx_setprop_6_loess_13loess_control_trace_hat, __pyx_k4, 0},
+  {"iterations", __pyx_getprop_6_loess_13loess_control_iterations, __pyx_setprop_6_loess_13loess_control_iterations, __pyx_k5, 0},
+  {"cell", __pyx_getprop_6_loess_13loess_control_cell, __pyx_setprop_6_loess_13loess_control_cell, __pyx_k6, 0},
   {0, 0, 0, 0, 0}
 };
 
@@ -4459,7 +4603,7 @@
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_loess_control, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
+  "Loess control parameters.\n    \n:IVariables:\n    surface : string [\"interpolate\"]\n        Determines whether the fitted surface is computed directly at all points\n        (\"direct\") or whether an interpolation method is used (\"interpolate\").\n        The default (\"interpolate\") is what most users should use unless special \n        circumstances warrant.\n    statistics : string [\"approximate\"]\n        Determines whether the statistical quantities are computed exactly \n        (\"exact\") or approximately (\"approximate\"). \"exact\" should only be used \n        for testing the approximation in statistical development and is not meant \n        for routine usage because computation time can be horrendous.\n    trace_hat : string [\"wait.to.decide\"]\n        Determines how the trace of the hat matrix should be computed. The hat\n        matrix is used in the computation of the statistical quantities. \n        If \"exact\", an exact computation is done; this could be slow when the\n        number of observations n becomes large. If \"wait.to.decide\" is selected, \n        then a default is \"exact\" for n < 500 and \"approximate\" otherwise. \n        This option is only useful when the fitted surface is interpolated. If  \n        surface is \"exact\", an exact computation is always done for the trace. \n        Setting trace_hat to \"approximate\" for large dataset will substantially \n        reduce the computation time.\n    iterations : integer\n        Number of iterations of the robust fitting method. If the family is \n        \"gaussian\", the number of iterations is set to 0.\n    cell : integer\n        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),\n        where n is the number of observations, and span the smoothing parameter.\n        Then, a cell is further divided if the number of observations within it \n        is greater than or equal to k. This option is only used if the surface \n        is interpolated.\n    \n    ", /*tp_doc*/
   __pyx_tp_traverse_6_loess_loess_control, /*tp_traverse*/
   __pyx_tp_clear_6_loess_loess_control, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -4733,12 +4877,12 @@
 };
 
 static struct PyGetSetDef __pyx_getsets_6_loess_loess_model[] = {
-  {"normalize", __pyx_getprop_6_loess_11loess_model_normalize, __pyx_setprop_6_loess_11loess_model_normalize, __pyx_k9, 0},
-  {"span", __pyx_getprop_6_loess_11loess_model_span, __pyx_setprop_6_loess_11loess_model_span, __pyx_k10, 0},
-  {"degree", __pyx_getprop_6_loess_11loess_model_degree, __pyx_setprop_6_loess_11loess_model_degree, __pyx_k11, 0},
-  {"family", __pyx_getprop_6_loess_11loess_model_family, __pyx_setprop_6_loess_11loess_model_family, __pyx_k12, 0},
-  {"parametric_flags", __pyx_getprop_6_loess_11loess_model_parametric_flags, __pyx_setprop_6_loess_11loess_model_parametric_flags, __pyx_k13, 0},
-  {"drop_square_flags", __pyx_getprop_6_loess_11loess_model_drop_square_flags, __pyx_setprop_6_loess_11loess_model_drop_square_flags, __pyx_k14, 0},
+  {"normalize", __pyx_getprop_6_loess_11loess_model_normalize, __pyx_setprop_6_loess_11loess_model_normalize, 0, 0},
+  {"span", __pyx_getprop_6_loess_11loess_model_span, __pyx_setprop_6_loess_11loess_model_span, 0, 0},
+  {"degree", __pyx_getprop_6_loess_11loess_model_degree, __pyx_setprop_6_loess_11loess_model_degree, 0, 0},
+  {"family", __pyx_getprop_6_loess_11loess_model_family, __pyx_setprop_6_loess_11loess_model_family, 0, 0},
+  {"parametric_flags", __pyx_getprop_6_loess_11loess_model_parametric_flags, __pyx_setprop_6_loess_11loess_model_parametric_flags, 0, 0},
+  {"drop_square_flags", __pyx_getprop_6_loess_11loess_model_drop_square_flags, __pyx_setprop_6_loess_11loess_model_drop_square_flags, 0, 0},
   {0, 0, 0, 0, 0}
 };
 
@@ -4831,7 +4975,7 @@
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_loess_model, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
+  "loess_model contains parameters required for a loess fit.\n    \n:IVariables:\n    normalize : boolean [True]\n        Determines whether the independent variables should be normalized.  \n        If True, the normalization is performed by setting the 10% trimmed \n        standard deviation to one. If False, no normalization is carried out. \n        This option is only useful for more than one variable. For spatial\n        coordinates predictors or variables with a common scale, it should be \n        set to False.\n    span : float [0.75]\n        Smoothing factor, as a fraction of the number of points to take into\n        account. \n    degree : integer [2]\n        Overall degree of locally-fitted polynomial. 1 is locally-linear \n        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.\n    family : string [\"gaussian\"]\n        Determines the assumed distribution of the errors. The values are \n        \"gaussian\" or \"symmetric\". If \"gaussian\" is selected, the fit is \n        performed with least-squares. If \"symmetric\" is selected, the fit\n        is performed robustly by redescending M-estimators.\n    parametric_flags : sequence [ [False]*p ]\n        Indicates which independent variables should be conditionally-parametric\n        (if there are two or more independent variables). The argument should be\n        a sequence of booleans, with the same size as the number of independent \n        variables, specified in the order of the predictor group ordered in x. \n        Note: elements of the sequence cannot be modified individually: the whole\n        sequence must be given.\n    drop_square : sequence [ [False]* p]\n        When there are two or more independent variables and when a 2nd order\n        polynomial is used, \"drop_square_flags\" specifies those numeric predictors \n        whose squares should be dropped from the set of fitting variables. \n        The method of specification is the same as for parametric.  \n        Note: elements of the sequence cannot be modified individually: the whole\n        sequence must be given.\n\n    ", /*tp_doc*/
   __pyx_tp_traverse_6_loess_loess_model, /*tp_traverse*/
   __pyx_tp_clear_6_loess_loess_model, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -4857,9 +5001,12 @@
   0, /*tp_subclasses*/
   0, /*tp_weaklist*/
 };
+static struct __pyx_vtabstruct_6_loess_loess_outputs __pyx_vtable_6_loess_loess_outputs;
 
 static PyObject *__pyx_tp_new_6_loess_loess_outputs(PyTypeObject *t, PyObject *a, PyObject *k) {
   PyObject *o = (*t->tp_alloc)(t, 0);
+  struct __pyx_obj_6_loess_loess_outputs *p = (struct __pyx_obj_6_loess_loess_outputs *)o;
+  *(struct __pyx_vtabstruct_6_loess_loess_outputs **)&p->__pyx_vtab = __pyx_vtabptr_6_loess_loess_outputs;
   return o;
 }
 
@@ -4929,17 +5076,17 @@
 };
 
 static struct PyGetSetDef __pyx_getsets_6_loess_loess_outputs[] = {
-  {"fitted_values", __pyx_getprop_6_loess_13loess_outputs_fitted_values, 0, __pyx_k15, 0},
-  {"fitted_residuals", __pyx_getprop_6_loess_13loess_outputs_fitted_residuals, 0, __pyx_k16, 0},
-  {"pseudovalues", __pyx_getprop_6_loess_13loess_outputs_pseudovalues, 0, __pyx_k17, 0},
-  {"diagonal", __pyx_getprop_6_loess_13loess_outputs_diagonal, 0, __pyx_k18, 0},
-  {"robust", __pyx_getprop_6_loess_13loess_outputs_robust, 0, __pyx_k19, 0},
-  {"divisor", __pyx_getprop_6_loess_13loess_outputs_divisor, 0, __pyx_k20, 0},
-  {"enp", __pyx_getprop_6_loess_13loess_outputs_enp, 0, __pyx_k21, 0},
-  {"s", __pyx_getprop_6_loess_13loess_outputs_s, 0, __pyx_k22, 0},
-  {"one_delta", __pyx_getprop_6_loess_13loess_outputs_one_delta, 0, __pyx_k23, 0},
-  {"two_delta", __pyx_getprop_6_loess_13loess_outputs_two_delta, 0, __pyx_k24, 0},
-  {"trace_hat", __pyx_getprop_6_loess_13loess_outputs_trace_hat, 0, __pyx_k25, 0},
+  {"fitted_values", __pyx_getprop_6_loess_13loess_outputs_fitted_values, 0, 0, 0},
+  {"fitted_residuals", __pyx_getprop_6_loess_13loess_outputs_fitted_residuals, 0, 0, 0},
+  {"pseudovalues", __pyx_getprop_6_loess_13loess_outputs_pseudovalues, 0, 0, 0},
+  {"diagonal", __pyx_getprop_6_loess_13loess_outputs_diagonal, 0, 0, 0},
+  {"robust", __pyx_getprop_6_loess_13loess_outputs_robust, 0, 0, 0},
+  {"divisor", __pyx_getprop_6_loess_13loess_outputs_divisor, 0, 0, 0},
+  {"enp", __pyx_getprop_6_loess_13loess_outputs_enp, 0, 0, 0},
+  {"s", __pyx_getprop_6_loess_13loess_outputs_s, 0, 0, 0},
+  {"one_delta", __pyx_getprop_6_loess_13loess_outputs_one_delta, 0, 0, 0},
+  {"two_delta", __pyx_getprop_6_loess_13loess_outputs_two_delta, 0, 0, 0},
+  {"trace_hat", __pyx_getprop_6_loess_13loess_outputs_trace_hat, 0, 0, 0},
   {0, 0, 0, 0, 0}
 };
 
@@ -5032,7 +5179,7 @@
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_loess_outputs, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
+  "Outputs of a loess fit. This object is automatically created with empty\nvalues when a new loess object is instantiated. The object gets filled when the \nloess.fit() method is called.\n    \n:IVariables:\n    fitted_values : ndarray\n        The (n,) ndarray of fitted values.\n    fitted_residuals : ndarray\n        The (n,) ndarray of fitted residuals (observations - fitted values).\n    enp : float\n        Equivalent number of parameters.\n    s : float\n        Estimate of the scale of residuals.\n    one_delta: float\n        Statistical parameter used in the computation of standard errors.\n    two_delta : float\n        Statistical parameter used in the computation of standard errors.\n    pseudovalues : ndarray\n        The (n,) ndarray of adjusted values of the response when robust estimation \n        is used.\n    trace_hat : float    \n        Trace of the operator hat matrix.\n    diagonal : ndarray\n        Diagonal of the operator hat matrix.\n    robust : ndarray\n        The (n,) ndarray of robustness weights for robust fitting.\n    divisor : ndarray\n        The (p,) array of normalization divisors for numeric predictors.\n    ", /*tp_doc*/
   __pyx_tp_traverse_6_loess_loess_outputs, /*tp_traverse*/
   __pyx_tp_clear_6_loess_loess_outputs, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -5072,6 +5219,15 @@
 
 static void __pyx_tp_dealloc_6_loess_conf_intervals(PyObject *o) {
   struct __pyx_obj_6_loess_conf_intervals *p = (struct __pyx_obj_6_loess_conf_intervals *)o;
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++o->ob_refcnt;
+    __pyx_f_6_loess_14conf_intervals___dealloc__(o);
+    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+    --o->ob_refcnt;
+    PyErr_Restore(etype, eval, etb);
+  }
   Py_XDECREF(((PyObject *)p->lower));
   Py_XDECREF(((PyObject *)p->fit));
   Py_XDECREF(((PyObject *)p->upper));
@@ -5204,7 +5360,7 @@
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_conf_intervals, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
+  "Pointwise confidence intervals of a loess-predicted object:\n    \n:IVariables:\n    fit : ndarray\n        Predicted values.\n    lower : ndarray\n        Lower bounds of the confidence intervals.\n    upper : ndarray\n        Upper bounds of the confidence intervals.\n    ", /*tp_doc*/
   __pyx_tp_traverse_6_loess_conf_intervals, /*tp_traverse*/
   __pyx_tp_clear_6_loess_conf_intervals, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -5299,10 +5455,10 @@
 };
 
 static struct PyGetSetDef __pyx_getsets_6_loess_loess_predicted[] = {
-  {"values", __pyx_getprop_6_loess_15loess_predicted_values, 0, __pyx_k26, 0},
-  {"stderr", __pyx_getprop_6_loess_15loess_predicted_stderr, 0, __pyx_k27, 0},
-  {"residual_scale", __pyx_getprop_6_loess_15loess_predicted_residual_scale, 0, __pyx_k28, 0},
-  {"df", __pyx_getprop_6_loess_15loess_predicted_df, 0, __pyx_k29, 0},
+  {"values", __pyx_getprop_6_loess_15loess_predicted_values, 0, 0, 0},
+  {"stderr", __pyx_getprop_6_loess_15loess_predicted_stderr, 0, 0, 0},
+  {"residual_scale", __pyx_getprop_6_loess_15loess_predicted_residual_scale, 0, 0, 0},
+  {"df", __pyx_getprop_6_loess_15loess_predicted_df, 0, 0, 0},
   {0, 0, 0, 0, 0}
 };
 
@@ -5395,7 +5551,7 @@
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_loess_predicted, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
+  "Predicted values and standard errors of a loess object\n\n:IVariables:\n    values : ndarray\n        The (m,) ndarray of loess values evaluated at newdata\n    stderr : ndarray\n        The (m,) ndarray of the estimates of the standard error on the estimated\n        values.\n    residual_scale : float\n        Estimate of the scale of the residuals\n    df : integer\n        Degrees of freedom of the t-distribution used to compute pointwise \n        confidence intervals for the evaluated surface.\n    nest : integer\n        Number of new observations.\n    ", /*tp_doc*/
   __pyx_tp_traverse_6_loess_loess_predicted, /*tp_traverse*/
   __pyx_tp_clear_6_loess_loess_predicted, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -5496,8 +5652,9 @@
 }
 
 static struct PyMethodDef __pyx_methods_6_loess_loess[] = {
-  {"fit", (PyCFunction)__pyx_f_6_loess_5loess_fit, METH_VARARGS|METH_KEYWORDS, 0},
-  {"summary", (PyCFunction)__pyx_f_6_loess_5loess_summary, METH_VARARGS|METH_KEYWORDS, 0},
+  {"fit", (PyCFunction)__pyx_f_6_loess_5loess_fit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6_loess_5loess_fit},
+  {"input_summary", (PyCFunction)__pyx_f_6_loess_5loess_input_summary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6_loess_5loess_input_summary},
+  {"output_summary", (PyCFunction)__pyx_f_6_loess_5loess_output_summary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6_loess_5loess_output_summary},
   {"predict", (PyCFunction)__pyx_f_6_loess_5loess_predict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6_loess_5loess_predict},
   {0, 0, 0, 0}
 };
@@ -5509,8 +5666,6 @@
   {"kd_tree", T_OBJECT, offsetof(struct __pyx_obj_6_loess_loess, kd_tree), READONLY, 0},
   {"outputs", T_OBJECT, offsetof(struct __pyx_obj_6_loess_loess, outputs), READONLY, 0},
   {"predicted", T_OBJECT, offsetof(struct __pyx_obj_6_loess_loess, predicted), READONLY, 0},
-  {"nobs", T_LONG, offsetof(struct __pyx_obj_6_loess_loess, nobs), 0, 0},
-  {"npar", T_LONG, offsetof(struct __pyx_obj_6_loess_loess, npar), 0, 0},
   {0, 0, 0, 0, 0}
 };
 
@@ -5603,7 +5758,7 @@
   0, /*tp_setattro*/
   &__pyx_tp_as_buffer_loess, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  0, /*tp_doc*/
+  "\n    \n:Keywords:\n    x : ndarray\n        A (n,p) ndarray of independent variables, with n the number of observations\n        and p the number of variables.\n    y : ndarray\n        A (n,) ndarray of observations\n    weights : ndarray\n        A (n,) ndarray of weights to be given to individual observations in the \n        sum of squared residuals that forms the local fitting criterion. If not\n        None, the weights should be non negative. If the different observations\n        have non-equal variances, the weights should be inversely proportional \n        to the variances.\n        By default, an unweighted fit is carried out (all the weights are one).\n    surface : string [\"interpolate\"]\n        Determines whether the fitted surface is computed directly at all points\n        (\"direct\") or whether an interpolation method is used (\"interpolate\").\n        The default (\"interpolate\") is what most users should use unless special \n        circumstances warrant.\n    statistics : string [\"approximate\"]\n        Determines whether the statistical quantities are computed exactly \n        (\"exact\") or approximately (\"approximate\"). \"exact\" should only be used \n        for testing the approximation in statistical development and is not meant \n        for routine usage because computation time can be horrendous.\n    trace_hat : string [\"wait.to.decide\"]\n        Determines how the trace of the hat matrix should be computed. The hat\n        matrix is used in the computation of the statistical quantities. \n        If \"exact\", an exact computation is done; this could be slow when the\n        number of observations n becomes large. If \"wait.to.decide\" is selected, \n        then a default is \"exact\" for n < 500 and \"approximate\" otherwise. \n        This option is only useful when the fitted surface is interpolated. If  \n        surface is \"exact\", an exact computation is always done for the trace. \n        Setting trace_hat to \"approximate\" for large dataset will substantially \n        reduce the computation time.\n    iterations : integer\n        Number of iterations of the robust fitting method. If the family is \n        \"gaussian\", the number of iterations is set to 0.\n    cell : integer\n        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),\n        where n is the number of observations, and span the smoothing parameter.\n        Then, a cell is further divided if the number of observations within it \n        is greater than or equal to k. This option is only used if the surface \n        is interpolated.\n    span : float [0.75]\n        Smoothing factor, as a fraction of the number of points to take into\n        account. \n    degree : integer [2]\n        Overall degree of locally-fitted polynomial. 1 is locally-linear \n        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.\n    normalize : boolean [True]\n        Determines whether the independent variables should be normalized.  \n        If True, the normalization is performed by setting the 10% trimmed \n        standard deviation to one. If False, no normalization is carried out. \n        This option is only useful for more than one variable. For spatial\n        coordinates predictors or variables with a common scale, it should be \n        set to False.\n    family : string [\"gaussian\"]\n        Determines the assumed distribution of the errors. The values are \n        \"gaussian\" or \"symmetric\". If \"gaussian\" is selected, the fit is \n        performed with least-squares. If \"symmetric\" is selected, the fit\n        is performed robustly by redescending M-estimators.\n    parametric_flags : sequence [ [False]*p ]\n        Indicates which independent variables should be conditionally-parametric\n       (if there are two or more independent variables). The argument should \n       be a sequence of booleans, with the same size as the number of independent \n       variables, specified in the order of the predictor group ordered in x. \n    drop_square : sequence [ [False]* p]\n        When there are two or more independent variables and when a 2nd order\n        polynomial is used, \"drop_square_flags\" specifies those numeric predictors \n        whose squares should be dropped from the set of fitting variables. \n        The method of specification is the same as for parametric.  \n        \n:Outputs:\n    fitted_values : ndarray\n        The (n,) ndarray of fitted values.\n    fitted_residuals : ndarray\n        The (n,) ndarray of fitted residuals (observations - fitted values).\n    enp : float\n        Equivalent number of parameters.\n    s : float\n        Estimate of the scale of residuals.\n    one_delta: float\n        Statistical parameter used in the computation of standard errors.\n    two_delta : float\n        Statistical parameter used in the computation of standard errors.\n    pseudovalues : ndarray\n        The (n,) ndarray of adjusted values of the response when robust estimation \n        is used.\n    trace_hat : float    \n        Trace of the operator hat matrix.\n    diagonal :\n        Diagonal of the operator hat matrix.\n    robust : ndarray\n        The (n,) ndarray of robustness weights for robust fitting.\n    divisor : ndarray\n        The (p,) array of normalization divisors for numeric predictors.\n\n    ", /*tp_doc*/
   __pyx_tp_traverse_6_loess_loess, /*tp_traverse*/
   __pyx_tp_clear_6_loess_loess, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -5793,44 +5948,48 @@
   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
   if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
   if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
-  if (PyType_Ready(&__pyx_type_6_loess_loess_inputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "loess_inputs", (PyObject *)&__pyx_type_6_loess_loess_inputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; goto __pyx_L1;}
+  __pyx_type_6_loess_loess_inputs.tp_free = _PyObject_GC_Del;
+  if (PyType_Ready(&__pyx_type_6_loess_loess_inputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_inputs", (PyObject *)&__pyx_type_6_loess_loess_inputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;}
   __pyx_ptype_6_loess_loess_inputs = &__pyx_type_6_loess_loess_inputs;
-  if (PyType_Ready(&__pyx_type_6_loess_loess_control) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "loess_control", (PyObject *)&__pyx_type_6_loess_loess_control) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; goto __pyx_L1;}
+  if (PyType_Ready(&__pyx_type_6_loess_loess_control) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_control", (PyObject *)&__pyx_type_6_loess_loess_control) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; goto __pyx_L1;}
   __pyx_ptype_6_loess_loess_control = &__pyx_type_6_loess_loess_control;
-  if (PyType_Ready(&__pyx_type_6_loess_loess_kd_tree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "loess_kd_tree", (PyObject *)&__pyx_type_6_loess_loess_kd_tree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
+  if (PyType_Ready(&__pyx_type_6_loess_loess_kd_tree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_kd_tree", (PyObject *)&__pyx_type_6_loess_loess_kd_tree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
   __pyx_ptype_6_loess_loess_kd_tree = &__pyx_type_6_loess_loess_kd_tree;
   __pyx_vtabptr_6_loess_loess_model = &__pyx_vtable_6_loess_loess_model;
   *(void(**)())&__pyx_vtable_6_loess_loess_model.setup = (void(*)())__pyx_f_6_loess_11loess_model_setup;
-  if (PyType_Ready(&__pyx_type_6_loess_loess_model) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
-  if (__Pyx_SetVtable(__pyx_type_6_loess_loess_model.tp_dict, __pyx_vtabptr_6_loess_loess_model) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "loess_model", (PyObject *)&__pyx_type_6_loess_loess_model) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
+  if (PyType_Ready(&__pyx_type_6_loess_loess_model) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;}
+  if (__Pyx_SetVtable(__pyx_type_6_loess_loess_model.tp_dict, __pyx_vtabptr_6_loess_loess_model) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_model", (PyObject *)&__pyx_type_6_loess_loess_model) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; goto __pyx_L1;}
   __pyx_ptype_6_loess_loess_model = &__pyx_type_6_loess_loess_model;
-  if (PyType_Ready(&__pyx_type_6_loess_loess_outputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "loess_outputs", (PyObject *)&__pyx_type_6_loess_loess_outputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;}
+  __pyx_vtabptr_6_loess_loess_outputs = &__pyx_vtable_6_loess_loess_outputs;
+  *(void(**)())&__pyx_vtable_6_loess_loess_outputs.setup = (void(*)())__pyx_f_6_loess_13loess_outputs_setup;
+  if (PyType_Ready(&__pyx_type_6_loess_loess_outputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
+  if (__Pyx_SetVtable(__pyx_type_6_loess_loess_outputs.tp_dict, __pyx_vtabptr_6_loess_loess_outputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_outputs", (PyObject *)&__pyx_type_6_loess_loess_outputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
   __pyx_ptype_6_loess_loess_outputs = &__pyx_type_6_loess_loess_outputs;
   __pyx_vtabptr_6_loess_conf_intervals = &__pyx_vtable_6_loess_conf_intervals;
   *(void(**)())&__pyx_vtable_6_loess_conf_intervals.setup = (void(*)())__pyx_f_6_loess_14conf_intervals_setup;
   __pyx_type_6_loess_conf_intervals.tp_free = _PyObject_GC_Del;
-  if (PyType_Ready(&__pyx_type_6_loess_conf_intervals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; goto __pyx_L1;}
-  if (__Pyx_SetVtable(__pyx_type_6_loess_conf_intervals.tp_dict, __pyx_vtabptr_6_loess_conf_intervals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "conf_intervals", (PyObject *)&__pyx_type_6_loess_conf_intervals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; goto __pyx_L1;}
+  if (PyType_Ready(&__pyx_type_6_loess_conf_intervals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  if (__Pyx_SetVtable(__pyx_type_6_loess_conf_intervals.tp_dict, __pyx_vtabptr_6_loess_conf_intervals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "conf_intervals", (PyObject *)&__pyx_type_6_loess_conf_intervals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
   __pyx_ptype_6_loess_conf_intervals = &__pyx_type_6_loess_conf_intervals;
   __pyx_vtabptr_6_loess_loess_predicted = &__pyx_vtable_6_loess_loess_predicted;
   *(void(**)())&__pyx_vtable_6_loess_loess_predicted.setup = (void(*)())__pyx_f_6_loess_15loess_predicted_setup;
   __pyx_type_6_loess_loess_predicted.tp_free = _PyObject_GC_Del;
-  if (PyType_Ready(&__pyx_type_6_loess_loess_predicted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
-  if (__Pyx_SetVtable(__pyx_type_6_loess_loess_predicted.tp_dict, __pyx_vtabptr_6_loess_loess_predicted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "loess_predicted", (PyObject *)&__pyx_type_6_loess_loess_predicted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; goto __pyx_L1;}
+  if (PyType_Ready(&__pyx_type_6_loess_loess_predicted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; goto __pyx_L1;}
+  if (__Pyx_SetVtable(__pyx_type_6_loess_loess_predicted.tp_dict, __pyx_vtabptr_6_loess_loess_predicted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_predicted", (PyObject *)&__pyx_type_6_loess_loess_predicted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; goto __pyx_L1;}
   __pyx_ptype_6_loess_loess_predicted = &__pyx_type_6_loess_loess_predicted;
   __pyx_type_6_loess_loess.tp_free = _PyObject_GC_Del;
-  if (PyType_Ready(&__pyx_type_6_loess_loess) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "loess", (PyObject *)&__pyx_type_6_loess_loess) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; goto __pyx_L1;}
+  if (PyType_Ready(&__pyx_type_6_loess_loess) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess", (PyObject *)&__pyx_type_6_loess_loess) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; goto __pyx_L1;}
   __pyx_ptype_6_loess_loess = &__pyx_type_6_loess_loess;
-  if (PyType_Ready(&__pyx_type_6_loess_anova) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
-  if (PyObject_SetAttrString(__pyx_m, "anova", (PyObject *)&__pyx_type_6_loess_anova) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
+  if (PyType_Ready(&__pyx_type_6_loess_anova) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "anova", (PyObject *)&__pyx_type_6_loess_anova) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
   __pyx_ptype_6_loess_anova = &__pyx_type_6_loess_anova;
   __pyx_ptype_7c_numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (!__pyx_ptype_7c_numpy_dtype) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; goto __pyx_L1;}
   __pyx_ptype_7c_numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (!__pyx_ptype_7c_numpy_ndarray) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; goto __pyx_L1;}
@@ -5849,27 +6008,34 @@
   if (PyObject_SetAttr(__pyx_m, __pyx_n_narray, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
   Py_DECREF(__pyx_2); __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":12 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":10 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_float_); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_float_, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":13 */
   import_array();
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":73 */
-  __pyx_k31;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":36 */
+  __pyx_k8;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":721 */
-  __pyx_1 = PyFloat_FromDouble(0.95); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; goto __pyx_L1;}
-  __pyx_k32 = __pyx_1;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":609 */
+  __pyx_1 = PyFloat_FromDouble(0.95); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; goto __pyx_L1;}
+  __pyx_k9 = __pyx_1;
   __pyx_1 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":763 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":758 */
   Py_INCREF(Py_None);
-  __pyx_k33 = Py_None;
+  __pyx_k10 = Py_None;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":834 */
-  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; goto __pyx_L1;}
-  __pyx_k34 = __pyx_2;
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":821 */
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; goto __pyx_L1;}
+  __pyx_k11 = __pyx_2;
   __pyx_2 = 0;
 
-  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":883 */
+  /* "/home/backtopop/workspace/pyloess/src/_loess.pyx":889 */
   return;
   __pyx_L1:;
   Py_XDECREF(__pyx_1);

Modified: trunk/Lib/sandbox/pyloess/src/_loess.pyx
===================================================================
--- trunk/Lib/sandbox/pyloess/src/_loess.pyx	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/src/_loess.pyx	2007-03-27 06:38:36 UTC (rev 2874)
@@ -7,6 +7,7 @@
     PyArray_SimpleNewFromData
 import numpy
 narray = numpy.array
+float_ = numpy.float_
 
 # NumPy must be initialized
 c_numpy.import_array()
@@ -31,142 +32,9 @@
         a_ndr.shape = (rows, cols)
     return a_ndr.astype(numpy.bool)
 
-##cimport modelflags
-##import modelflags
-#
-#cdef list_to_clist(object p_list):
-#    cdef int i, imax
-#    p_list = list(p_list)
-#    imax = min(8, len(p_list))
-#    for i from 0 <= i < imax:
-#        c_list[i] = p_list[i]
-#    return c_list[0]
-#cdef object clist_to_list(int c_list[8]):
-#    cdef int i, imax
-#    p_list = [False] * 8
-#    imax = min(8, len(p_list))
-#    for i from 0 <= i < imax:
-#        p_list[i] = c_list[i]
-#    return p_list
-#        
-#
-#class modelflags:
-#    def __init__(self):
-#        self.str_list = [False] * 8
-#        self.c_list = list_to_clist(self.str_list)
-#    def __getitem__(self, idx):
-#        return self.str_list[idx]
-#    def __setitem__(self, idx, val):
-#        cdef int tmpval
-#        tmpval = val
-#        self.c_list[idx] = tmpval
-#        self.str_list[idx] = bool(val)
-#    def __str__(self):
-#        return str(self.str_list)
-#
-##class modelflags(c_modelflags):
-##    def __init__(self):
-##        c_modelflags.__init__(self)
-##        
 
-
 """
-:Keywords:
-    x : ndarray
-        A (n,p) ndarray of independent variables, with n the number of observations
-        and p the number of variables.
-    y : ndarray
-        A (n,) ndarray of observations
-    weights : ndarray
-        A (n,) ndarray of weights to be given to individual observations in the 
-        sum of squared residuals that forms the local fitting criterion. If not
-        None, the weights should be non negative. If the different observations
-        have non-equal variances, the weights should be inversely proportional 
-        to the variances.
-        By default, an unweighted fit is carried out (all the weights are one).
-    surface : string ["interpolate"]
-        Determines whether the fitted surface is computed directly at all points
-        ("direct") or whether an interpolation method is used ("interpolate").
-        The default ("interpolate") is what most users should use unless special 
-        circumstances warrant.
-    statistics : string ["approximate"]
-        Determines whether the statistical quantities are computed exactly 
-        ("exact") or approximately ("approximate"). "exact" should only be used 
-        for testing the approximation in statistical development and is not meant 
-        for routine usage because computation time can be horrendous.
-    trace_hat : string ["wait.to.decide"]
-        Determines how the trace of the hat matrix should be computed. The hat
-        matrix is used in the computation of the statistical quantities. 
-        If "exact", an exact computation is done; this could be slow when the
-        number of observations n becomes large. If "wait.to.decide" is selected, 
-        then a default is "exact" for n < 500 and "approximate" otherwise. 
-        This option is only useful when the fitted surface is interpolated. If  
-        surface is "exact", an exact computation is always done for the trace. 
-        Setting trace_hat to "approximate" for large dataset will substantially 
-        reduce the computation time.
-    iterations : integer
-        Number of iterations of the robust fitting method. If the family is 
-        "gaussian", the number of iterations is set to 0.
-    cell : integer
-        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),
-        where n is the number of observations, and span the smoothing parameter.
-        Then, a cell is further divided if the number of observations within it 
-        is greater than or equal to k. This option is only used if the surface 
-        is interpolated.
-    span : float [0.75]
-        Smoothing factor, as a fraction of the number of points to take into
-        account. 
-    degree : integer [2]
-        Overall degree of locally-fitted polynomial. 1 is locally-linear 
-        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.
-    normalize : boolean [True]
-        Determines whether the independent variables should be normalized.  
-        If True, the normalization is performed by setting the 10% trimmed 
-        standard deviation to one. If False, no normalization is carried out. 
-        This option is only useful for more than one variable. For spatial
-        coordinates predictors or variables with a common scale, it should be 
-        set to False.
-    family : string ["gaussian"]
-        Determines the assumed distribution of the errors. The values are 
-        "gaussian" or "symmetric". If "gaussian" is selected, the fit is 
-        performed with least-squares. If "symmetric" is selected, the fit
-        is performed robustly by redescending M-estimators.
-    parametric_flags : sequence [ [False]*p ]
-        Indicates which independent variables should be conditionally-parametric
-       (if there are two or more independent variables). The argument should 
-       be a sequence of booleans, with the same size as the number of independent 
-       variables, specified in the order of the predictor group ordered in x. 
-    drop_square : sequence [ [False]* p]
-        When there are two or more independent variables and when a 2nd order
-        polynomial is used, "drop_square_flags" specifies those numeric predictors 
-        whose squares should be dropped from the set of fitting variables. 
-        The method of specification is the same as for parametric.  
         
-:Outputs:
-    fitted_values : ndarray
-        The (n,) ndarray of fitted values.
-    fitted_residuals : ndarray
-        The (n,) ndarray of fitted residuals (observations - fitted values).
-    enp : float
-        Equivalent number of parameters.
-    s : float
-        Estimate of the scale of residuals.
-    one_delta: float
-        Statistical parameter used in the computation of standard errors.
-    two_delta : float
-        Statistical parameter used in the computation of standard errors.
-    pseudovalues : ndarray
-        The (n,) ndarray of adjusted values of the response when robust estimation 
-        is used.
-    trace_hat : float    
-        Trace of the operator hat matrix.
-    diagonal :
-        Diagonal of the operator hat matrix.
-    robust : ndarray
-        The (n,) ndarray of robustness weights for robust fitting.
-    divisor : ndarray
-        The (p,) array of normalization divisors for numeric predictors.
-        
 
     newdata : ndarray
         The (m,p) array of independent variables where the surface must be estimated.
@@ -191,16 +59,49 @@
 #---- ---- loess model ---
 #####---------------------------------------------------------------------------
 cdef class loess_inputs:
+    """Loess inputs
+    
+:IVariables:
+    x : ndarray
+        A (n,p) ndarray of independent variables, with n the number of observations
+        and p the number of variables.
+    y : ndarray
+        A (n,) ndarray of observations
+    nobs : integer
+        Number of observations: nobs=n.
+    npar : integer
+        Number of independent variables: npar=p.
+    weights : ndarray
+        A (n,) ndarray of weights to be given to individual observations in the 
+        sum of squared residuals that forms the local fitting criterion. If not
+        None, the weights should be non negative. If the different observations
+        have non-equal variances, the weights should be inversely proportional 
+        to the variances.
+        By default, an unweighted fit is carried out (all the weights are one).
+    """
     cdef c_loess.c_loess_inputs *_base
+    cdef ndarray w_ndr
+    cdef readonly ndarray x, y, masked, x_eff, y_eff
+    cdef readonly int nobs, npar
     #.........
-    property x:
-        def __get__(self):
-            return floatarray_from_data(self._base.n, self._base.p, self._base.x)
+    def __init__(self, x_data, y_data):
+        cdef ndarray unmasked
+        self.x = narray(x_data, copy=False, subok=True, dtype=float_, order='C')
+        self.y = narray(y_data, copy=False, subok=True, dtype=float_, order='C')
+        # Check the dimensions ........
+        if self.x.ndim == 1:
+            self.npar = 1
+        elif self.x.ndim == 2:
+            self.npar = self.x.shape[-1]
+        else:
+            raise ValueError("The array of indepedent varibales should be 2D at most!")
+        self.nobs = len(self.x)         
+        # Get the effective data ......
+        self.x_eff = self.x.ravel()
+        self.y_eff = self.y
+        self.w_ndr = numpy.ones((self.nobs,), dtype=float_)
+
     #.........    
-    property y:
-        def __get__(self):
-            return floatarray_from_data(self._base.n, 1, self._base.y)
-    #.........    
     property weights:
         """A (n,) ndarray of weights to be given to individual observations in the 
         sum of squared residuals that forms the local fitting criterion. If not
@@ -210,30 +111,55 @@
         By default, an unweighted fit is carried out (all the weights are one).
         """
         def __get__(self):
-            return floatarray_from_data(self._base.n, 1, self._base.weights)
+            return self.w_ndr
         
         def __set__(self, w):
             cdef npy_intp *dims
             cdef ndarray w_ndr
-            w_ndr = <ndarray>PyArray_FROMANY(w, NPY_DOUBLE, 1, 1, NPY_OWNDATA)
-            if w_ndr.ndim > 1 or w_ndr.size != self._base.n:
+            w_ndr = narray(w, copy=False, subok=False)
+            if w_ndr.ndim > 1 or w_ndr.size != self.nobs:
                 raise ValueError, "Invalid size of the 'weights' vector!"
+            self.w_ndr = w_ndr
             self._base.weights = <double *>w_ndr.data
-    #.........    
-    property nobs:
-        "Number of observations."
-        def __get__(self):
-            return self._base.n
-    #.........
-    property npar:
-        "Number of independent variables."
-        def __get__(self):
-            return self._base.p
 #       
 ######---------------------------------------------------------------------------
 ##---- ---- loess control ---
 ######---------------------------------------------------------------------------
 cdef class loess_control:
+    """Loess control parameters.
+    
+:IVariables:
+    surface : string ["interpolate"]
+        Determines whether the fitted surface is computed directly at all points
+        ("direct") or whether an interpolation method is used ("interpolate").
+        The default ("interpolate") is what most users should use unless special 
+        circumstances warrant.
+    statistics : string ["approximate"]
+        Determines whether the statistical quantities are computed exactly 
+        ("exact") or approximately ("approximate"). "exact" should only be used 
+        for testing the approximation in statistical development and is not meant 
+        for routine usage because computation time can be horrendous.
+    trace_hat : string ["wait.to.decide"]
+        Determines how the trace of the hat matrix should be computed. The hat
+        matrix is used in the computation of the statistical quantities. 
+        If "exact", an exact computation is done; this could be slow when the
+        number of observations n becomes large. If "wait.to.decide" is selected, 
+        then a default is "exact" for n < 500 and "approximate" otherwise. 
+        This option is only useful when the fitted surface is interpolated. If  
+        surface is "exact", an exact computation is always done for the trace. 
+        Setting trace_hat to "approximate" for large dataset will substantially 
+        reduce the computation time.
+    iterations : integer
+        Number of iterations of the robust fitting method. If the family is 
+        "gaussian", the number of iterations is set to 0.
+    cell : integer
+        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),
+        where n is the number of observations, and span the smoothing parameter.
+        Then, a cell is further divided if the number of observations within it 
+        is greater than or equal to k. This option is only used if the surface 
+        is interpolated.
+    
+    """
     cdef c_loess.c_loess_control *_base
     #.........    
     property surface:
@@ -364,45 +290,59 @@
 ##---- ---- loess model ---
 ######---------------------------------------------------------------------------
 cdef class loess_model:
+    """loess_model contains parameters required for a loess fit.
+    
+:IVariables:
+    normalize : boolean [True]
+        Determines whether the independent variables should be normalized.  
+        If True, the normalization is performed by setting the 10% trimmed 
+        standard deviation to one. If False, no normalization is carried out. 
+        This option is only useful for more than one variable. For spatial
+        coordinates predictors or variables with a common scale, it should be 
+        set to False.
+    span : float [0.75]
+        Smoothing factor, as a fraction of the number of points to take into
+        account. 
+    degree : integer [2]
+        Overall degree of locally-fitted polynomial. 1 is locally-linear 
+        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.
+    family : string ["gaussian"]
+        Determines the assumed distribution of the errors. The values are 
+        "gaussian" or "symmetric". If "gaussian" is selected, the fit is 
+        performed with least-squares. If "symmetric" is selected, the fit
+        is performed robustly by redescending M-estimators.
+    parametric_flags : sequence [ [False]*p ]
+        Indicates which independent variables should be conditionally-parametric
+        (if there are two or more independent variables). The argument should be
+        a sequence of booleans, with the same size as the number of independent 
+        variables, specified in the order of the predictor group ordered in x. 
+        Note: elements of the sequence cannot be modified individually: the whole
+        sequence must be given.
+    drop_square : sequence [ [False]* p]
+        When there are two or more independent variables and when a 2nd order
+        polynomial is used, "drop_square_flags" specifies those numeric predictors 
+        whose squares should be dropped from the set of fitting variables. 
+        The method of specification is the same as for parametric.  
+        Note: elements of the sequence cannot be modified individually: the whole
+        sequence must be given.
+
+    """
+        
     cdef c_loess.c_loess_model *_base
     cdef long npar
-#    cdef public double span
-#    cdef public int degree
-#    cdef public char *family
-#    cdef public parametric_mflags, drop_square_mflags
     #.........
     cdef setup(self, c_loess.c_loess_model *base, long npar):
         self._base = base
         self.npar = npar
-#        self.parametric_flags = modelflags()
-#        self.parametric_flags.c_list[0] = base.parametric[0]
-#        self.drop_square_flags = modelflags()
-#        self.drop_square_flags.c_list[0] = base.drop_square[0]
-#        self.span = self._base.span
-#        self.degree = self._base.degree
-#        self.family = self._base.family
-#        self.parametric_flags = boolarray_from_data(self.npar, 1, self._base.parametric)
-#        self.drop_square_flags = boolarray_from_data(self.npar, 1, self._base.drop_square)
         return self    
     #.........
     property normalize:
-        """
-    normalize : boolean [True]
-        Determines whether the independent variables should be normalized.  
-        If True, the normalization is performed by setting the 10% trimmed 
-        standard deviation to one. If False, no normalization is carried out. 
-        This option is only useful for more than one variable. For spatial
-        coordinates predictors or variables with a common scale, it should be 
-        set to False.
-        """
         def __get__(self):
             return bool(self._base.normalize)
         def __set__(self, normalize):
             self._base.normalize = normalize
     #.........
     property span:
-        """Smoothing factor, as a fraction of the number of points to take into
-    account. By default, span=0.75."""
         def __get__(self):
             return self._base.span
         def __set__(self, span):
@@ -411,25 +351,14 @@
             self._base.span = span
     #.........
     property degree:
-        """
-    degree : integer [2]
-        Overall degree of locally-fitted polynomial. 1 is locally-linear 
-        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.
-        """
         def __get__(self):
             return self._base.degree
         def __set__(self, degree):
             if degree < 0 or degree > 2:
                 raise ValueError("Degree should be between 0 and 2!")
+            self._base.degree = degree
     #.........
     property family:
-        """
-    family : string ["gaussian"]
-        Determines the assumed distribution of the errors. The values are 
-        "gaussian" or "symmetric". If "gaussian" is selected, the fit is 
-        performed with least-squares. If "symmetric" is selected, the fit
-        is performed robustly by redescending M-estimators.
-        """    
         def __get__(self):
             return self._base.family
         def __set__(self, family):
@@ -439,13 +368,6 @@
             self._base.family = family
     #.........
     property parametric_flags:
-        """
-    parametric_flags : sequence [ [False]*p ]
-        Indicates which independent variables should be conditionally-parametric
-       (if there are two or more independent variables). The argument should 
-       be a sequence of booleans, with the same size as the number of independent 
-       variables, specified in the order of the predictor group ordered in x. 
-        """
         def __get__(self):
             return boolarray_from_data(self.npar, 1, self._base.parametric)
         def __set__(self, paramf):
@@ -457,13 +379,6 @@
                 self._base.parametric[i] = p_ndr[i]
     #.........
     property drop_square_flags:
-        """
-    drop_square : sequence [ [False]* p]
-        When there are two or more independent variables and when a 2nd order
-        polynomial is used, "drop_square_flags" specifies those numeric predictors 
-        whose squares should be dropped from the set of fitting variables. 
-        The method of specification is the same as for parametric.  
-        """
         def __get__(self):
             return boolarray_from_data(self.npar, 1, self._base.drop_square)
         def __set__(self, drop_sq):
@@ -500,16 +415,16 @@
             self.drop_square_flags = drop_square
     #.........
     def __repr__(self):
-        return "loess model parameters @%s" % id(self)
+        return "<loess object: model parameters>"
     #.........
     def __str__(self):
         strg = ["Model parameters.....",
-                "family      : %s" % self.family,
-                "span        : %s" % self.span,
-                "degree      : %s" % self.degree,
-                "normalized  : %s" % self.normalize,
-                "parametric  : %s" % self.parametric_flags[:self.npar],
-                "drop_square : %s" % self.drop_square_flags[:self.npar]
+                "Family          : %s" % self.family,
+                "Span            : %s" % self.span,
+                "Degree          : %s" % self.degree,
+                "Normalized      : %s" % self.normalize,
+                "Parametric      : %s" % self.parametric_flags[:self.npar],
+                "Drop_square     : %s" % self.drop_square_flags[:self.npar]
                 ]
         return '\n'.join(strg)
         
@@ -517,93 +432,85 @@
 #---- ---- loess outputs ---
 #####---------------------------------------------------------------------------
 cdef class loess_outputs:
+    """Outputs of a loess fit. This object is automatically created with empty
+values when a new loess object is instantiated. The object gets filled when the 
+loess.fit() method is called.
+    
+:IVariables:
+    fitted_values : ndarray
+        The (n,) ndarray of fitted values.
+    fitted_residuals : ndarray
+        The (n,) ndarray of fitted residuals (observations - fitted values).
+    enp : float
+        Equivalent number of parameters.
+    s : float
+        Estimate of the scale of residuals.
+    one_delta: float
+        Statistical parameter used in the computation of standard errors.
+    two_delta : float
+        Statistical parameter used in the computation of standard errors.
+    pseudovalues : ndarray
+        The (n,) ndarray of adjusted values of the response when robust estimation 
+        is used.
+    trace_hat : float    
+        Trace of the operator hat matrix.
+    diagonal : ndarray
+        Diagonal of the operator hat matrix.
+    robust : ndarray
+        The (n,) ndarray of robustness weights for robust fitting.
+    divisor : ndarray
+        The (p,) array of normalization divisors for numeric predictors.
+    """
     cdef c_loess.c_loess_outputs *_base
     cdef long nobs, npar
     cdef readonly int activated
+    cdef setup(self,c_loess.c_loess_outputs *base, long nobs, long npar):
+        self._base = base
+        self.nobs = nobs
+        self.npar = npar
+        self.activated = False
     #........
     property fitted_values:    
-        """
-    fitted_values : ndarray
-        The (n,) ndarray of fitted values.
-        """
         def __get__(self):
             return floatarray_from_data(self.nobs, 1, self._base.fitted_values)
     #.........
     property fitted_residuals:
-        """
-    fitted_residuals : ndarray
-        The (n,) ndarray of fitted residuals (observations - fitted values).
-        """
         def __get__(self):
             return floatarray_from_data(self.nobs, 1, self._base.fitted_residuals)
     #.........
     property pseudovalues:
-        """
-    pseudovalues : ndarray
-        The (n,) ndarray of adjusted values of the response when robust estimation 
-        is used.
-        """        
         def __get__(self):
             return floatarray_from_data(self.nobs, 1, self._base.pseudovalues)
     #.........
     property diagonal:
-        """
-    diagonal :
-        Diagonal of the operator hat matrix.
-        """    
         def __get__(self):
             return floatarray_from_data(self.nobs, 1, self._base.diagonal)
     #.........
     property robust:
-        """
-    robust : ndarray
-        The (n,) ndarray of robustness weights for robust fitting.
-        """
         def __get__(self):
             return floatarray_from_data(self.nobs, 1, self._base.robust)
     #.........
     property divisor:
-        "Equivalent number of parameters."
         def __get__(self):
             return floatarray_from_data(self.npar, 1, self._base.divisor)
     #.........    
     property enp:
-        """
-    enp : float
-        Equivalent number of parameters.
-        """
         def __get__(self):
             return self._base.enp
     #.........
     property s:
-        """
-    s : float
-        Estimate of the scale of residuals.
-        """
         def __get__(self):
             return self._base.s
     #.........
     property one_delta:
-        """
-    one_delta: float
-        Statistical parameter used in the computation of standard errors.
-        """
         def __get__(self):
             return self._base.one_delta 
     #.........
     property two_delta:
-        """
-    two_delta : float
-        Statistical parameter used in the computation of standard errors.
-       """
         def __get__(self):
             return self._base.two_delta
     #.........
     property trace_hat:
-        """
-    trace_hat : float    
-        Trace of the operator hat matrix.
-        """
         def __get__(self):
             return self._base.trace_hat
     #.........
@@ -623,11 +530,21 @@
 #---- ---- loess confidence ---
 #####---------------------------------------------------------------------------
 cdef class conf_intervals:
+    """Pointwise confidence intervals of a loess-predicted object:
+    
+:IVariables:
+    fit : ndarray
+        Predicted values.
+    lower : ndarray
+        Lower bounds of the confidence intervals.
+    upper : ndarray
+        Upper bounds of the confidence intervals.
+    """
     cdef c_loess.c_conf_inv _base
     cdef readonly ndarray lower, fit, upper
     #.........
-#    def __dealloc__(self):
-#        c_loess.pw_free_mem(self._base)
+    def __dealloc__(self):
+        c_loess.pw_free_mem(&self._base)
     #.........
     cdef setup(self, c_loess.c_conf_inv base, long nest):
         self._base = base
@@ -645,11 +562,26 @@
 #---- ---- loess predictions ---
 #####---------------------------------------------------------------------------
 cdef class loess_predicted:
+    """Predicted values and standard errors of a loess object
+
+:IVariables:
+    values : ndarray
+        The (m,) ndarray of loess values evaluated at newdata
+    stderr : ndarray
+        The (m,) ndarray of the estimates of the standard error on the estimated
+        values.
+    residual_scale : float
+        Estimate of the scale of the residuals
+    df : integer
+        Degrees of freedom of the t-distribution used to compute pointwise 
+        confidence intervals for the evaluated surface.
+    nest : integer
+        Number of new observations.
+    """
+        
     cdef c_loess.c_prediction _base
     cdef readonly long nest
     cdef readonly conf_intervals confidence_intervals
-#    cdef readonly ndarray values, stderr
-#    cdef readonly double residual_scale, df
     #.........
     def __dealloc__(self):
         c_loess.pred_free_mem(&self._base)      
@@ -657,64 +589,20 @@
     cdef setup(self, c_loess.c_prediction base, long nest):
         self._base = base
         self.nest = nest
-#    cdef setup(self, c_loess.c_loess loess_base, object newdata, stderror):
-#        cdef ndarray p_ndr
-#        cdef double *p_dat
-#        cdef c_loess.c_prediction _prediction
-#        cdef int i, m
-#        #
-#        # Note : we need a copy as we may have to normalize
-#        p_ndr = narray(newdata, copy=True, subok=True, order='C').ravel()
-#        p_dat = <double *>p_ndr.data
-#        # Test the compatibility of sizes .......
-#        if p_ndr.size == 0:
-#            raise ValueError("Can't predict without input data !")
-#        (m, notOK) = divmod(len(p_ndr), loess_base.inputs.p)
-#        if notOK:
-#            raise ValueError(
-#                  "Incompatible data size: there should be as many rows as parameters")
-#        #.....
-#        c_loess.c_predict(p_dat, m, &loess_base, &_prediction, stderror)
-#        if loess_base.status.err_status:
-#            raise ValueError(loess_base.status.err_msg)
-#        self._base = _prediction
-#        self.nest = m
-##        self.values = floatarray_from_data(m, 1, _prediction.fit)
-##        self.stderr = floatarray_from_data(m, 1, _prediction.se_fit)
-##        self.residual_scale = _prediction.residual_scale
-##        self.df = _prediction.df
     #.........
     property values:
-        """
-    values : ndarray
-        The (m,) ndarray of loess values evaluated at newdata
-        """
         def __get__(self):
             return floatarray_from_data(self.nest, 1, self._base.fit)
     #.........
     property stderr:
-        """
-    stderr : ndarray
-        The (m,) ndarray of the estimates of the standard error on the estimated
-        values.
-        """
         def __get__(self):
             return floatarray_from_data(self.nest, 1, self._base.se_fit)
     #.........
     property residual_scale:
-        """
-    residual_scale : float
-        Estimate of the scale of the residuals
-        """
         def __get__(self):
             return self._base.residual_scale
     #.........
     property df:
-        """
-    df : integer
-        Degrees of freedom of the t-distribution used to compute pointwise 
-        confidence intervals for the evaluated surface.
-        """
         def __get__(self):
             return self._base.df        
     #.........
@@ -725,6 +613,15 @@
 :Parameters:
     coverage : float
         Confidence level of the confidence intervals limits, as a fraction.
+        
+:Returns:
+    A new conf_intervals object, consisting of:
+    fit : ndarray
+        Predicted values.
+    lower : ndarray
+        Lower bounds of the confidence intervals.
+    upper : ndarray
+        Upper bounds of the confidence intervals.
         """
         cdef c_loess.c_conf_inv _confintv
         if coverage < 0.5:
@@ -751,6 +648,105 @@
 #---- ---- loess base class ---
 #####---------------------------------------------------------------------------
 cdef class loess:
+    """
+    
+:Keywords:
+    x : ndarray
+        A (n,p) ndarray of independent variables, with n the number of observations
+        and p the number of variables.
+    y : ndarray
+        A (n,) ndarray of observations
+    weights : ndarray
+        A (n,) ndarray of weights to be given to individual observations in the 
+        sum of squared residuals that forms the local fitting criterion. If not
+        None, the weights should be non negative. If the different observations
+        have non-equal variances, the weights should be inversely proportional 
+        to the variances.
+        By default, an unweighted fit is carried out (all the weights are one).
+    surface : string ["interpolate"]
+        Determines whether the fitted surface is computed directly at all points
+        ("direct") or whether an interpolation method is used ("interpolate").
+        The default ("interpolate") is what most users should use unless special 
+        circumstances warrant.
+    statistics : string ["approximate"]
+        Determines whether the statistical quantities are computed exactly 
+        ("exact") or approximately ("approximate"). "exact" should only be used 
+        for testing the approximation in statistical development and is not meant 
+        for routine usage because computation time can be horrendous.
+    trace_hat : string ["wait.to.decide"]
+        Determines how the trace of the hat matrix should be computed. The hat
+        matrix is used in the computation of the statistical quantities. 
+        If "exact", an exact computation is done; this could be slow when the
+        number of observations n becomes large. If "wait.to.decide" is selected, 
+        then a default is "exact" for n < 500 and "approximate" otherwise. 
+        This option is only useful when the fitted surface is interpolated. If  
+        surface is "exact", an exact computation is always done for the trace. 
+        Setting trace_hat to "approximate" for large dataset will substantially 
+        reduce the computation time.
+    iterations : integer
+        Number of iterations of the robust fitting method. If the family is 
+        "gaussian", the number of iterations is set to 0.
+    cell : integer
+        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),
+        where n is the number of observations, and span the smoothing parameter.
+        Then, a cell is further divided if the number of observations within it 
+        is greater than or equal to k. This option is only used if the surface 
+        is interpolated.
+    span : float [0.75]
+        Smoothing factor, as a fraction of the number of points to take into
+        account. 
+    degree : integer [2]
+        Overall degree of locally-fitted polynomial. 1 is locally-linear 
+        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.
+    normalize : boolean [True]
+        Determines whether the independent variables should be normalized.  
+        If True, the normalization is performed by setting the 10% trimmed 
+        standard deviation to one. If False, no normalization is carried out. 
+        This option is only useful for more than one variable. For spatial
+        coordinates predictors or variables with a common scale, it should be 
+        set to False.
+    family : string ["gaussian"]
+        Determines the assumed distribution of the errors. The values are 
+        "gaussian" or "symmetric". If "gaussian" is selected, the fit is 
+        performed with least-squares. If "symmetric" is selected, the fit
+        is performed robustly by redescending M-estimators.
+    parametric_flags : sequence [ [False]*p ]
+        Indicates which independent variables should be conditionally-parametric
+       (if there are two or more independent variables). The argument should 
+       be a sequence of booleans, with the same size as the number of independent 
+       variables, specified in the order of the predictor group ordered in x. 
+    drop_square : sequence [ [False]* p]
+        When there are two or more independent variables and when a 2nd order
+        polynomial is used, "drop_square_flags" specifies those numeric predictors 
+        whose squares should be dropped from the set of fitting variables. 
+        The method of specification is the same as for parametric.  
+        
+:Outputs:
+    fitted_values : ndarray
+        The (n,) ndarray of fitted values.
+    fitted_residuals : ndarray
+        The (n,) ndarray of fitted residuals (observations - fitted values).
+    enp : float
+        Equivalent number of parameters.
+    s : float
+        Estimate of the scale of residuals.
+    one_delta: float
+        Statistical parameter used in the computation of standard errors.
+    two_delta : float
+        Statistical parameter used in the computation of standard errors.
+    pseudovalues : ndarray
+        The (n,) ndarray of adjusted values of the response when robust estimation 
+        is used.
+    trace_hat : float    
+        Trace of the operator hat matrix.
+    diagonal :
+        Diagonal of the operator hat matrix.
+    robust : ndarray
+        The (n,) ndarray of robustness weights for robust fitting.
+    divisor : ndarray
+        The (p,) array of normalization divisors for numeric predictors.
+
+    """
     cdef c_loess.c_loess _base
     cdef readonly loess_inputs inputs
     cdef readonly loess_model model
@@ -758,51 +754,33 @@
     cdef readonly loess_kd_tree kd_tree
     cdef readonly loess_outputs outputs
     cdef readonly loess_predicted predicted
-    cdef public long nobs, npar
     
     def __init__(self, object x, object y, object weights=None, **options):
         #
         cdef ndarray x_ndr, y_ndr
         cdef double *x_dat, *y_dat
         cdef int i
-        # Get the predictor array
-        x_ndr = narray(x, copy=True, subok=True, order='C')
-        x_dat = <double *>x_ndr.data
-        n = len(x_ndr)
-        p = x_ndr.size / n
-        self.npar = p
-        self.nobs = n
-        # Ravel the predictor array ...
-        if p > 1:
-            x_ndr.shape = (n*p,)
-        # Get the response array ......
-        y_ndr = narray(y, copy=False, subok=True, order='C')
-        y_dat = <double *>y_ndr.data
-        if y_ndr.size != n:
-            raise ValueError("Incompatible size between the response array (%i)"\
-                             " and the predictor array (%i)" % (y_ndr,n))
-        # Initialization ..............
+        # Initialize the inputs .......
+        self.inputs = loess_inputs(x, y)
+        x_dat = <double *>self.inputs.x_eff.data
+        y_dat = <double *>self.inputs.y_eff.data
+        n = self.inputs.nobs
+        p = self.inputs.npar
         c_loess.loess_setup(x_dat, y_dat, n, p, &self._base)
-        #
-        self.inputs = loess_inputs()
+        # Sets the _base input .........
         self.inputs._base = &self._base.inputs
-        #
+        # Initialize the model parameters
         self.model = loess_model()
         self.model.setup(&self._base.model, p)
-#        self.model._base = &self._base.model
-#        self.model.npar = p
-        #
+        # Initialize the control parameters
         self.control = loess_control()
         self.control._base = &self._base.control
-        #
+        # Initialize the kd tree ......
         self.kd_tree = loess_kd_tree()
         self.kd_tree._base = &self._base.kd_tree
-        #
+        # Initialize the outputs ......
         self.outputs = loess_outputs()
-        self.outputs._base = &self._base.outputs
-        self.outputs.activated = False
-        self.outputs.nobs = n
-        self.outputs.npar = p
+        self.outputs.setup(&self._base.outputs, n, p,)
         # Process options .............
         modelopt = {}
         controlopt = {}
@@ -817,14 +795,23 @@
         self.model.update(**modelopt)
     #......................................................
     def fit(self):
+        """Computes the loess parameters on the current inputs and sets of parameters."""
         c_loess.loess_fit(&self._base)
         self.outputs.activated = True
         if self._base.status.err_status:
             raise ValueError(self._base.status.err_msg)
         return
     #......................................................
-    def summary(self):
+    def input_summary(self):
+        """Returns some generic information about the loess parameters.
+        """
+        toprint = [str(self.inputs), str(self.model), str(self.control)]
+        return "\n".join(toprint)
+        
+    def output_summary(self):
+        """Returns some generic information about the loess fit."""
         print "Number of Observations         : %d" % self.inputs.nobs
+        print "Fit flag                       : %d" % bool(self.outputs.activated)
         print "Equivalent Number of Parameters: %.1f" % self.outputs.enp
         if self.model.family == "gaussian":
             print "Residual Standard Error        : %.4f" % self.outputs.s
@@ -832,13 +819,32 @@
             print "Residual Scale Estimate        : %.4f" % self.outputs.s
     #......................................................
     def predict(self, newdata, stderror=False):
+        """Computes loess estimates at the given new data points newdata. Returns
+a loess_predicted object, whose attributes are described below.
+        
+:Parameters:
+    newdata : ndarray
+        The (m,p) array of independent variables where the surface must be estimated,
+        with m the number of new data points, and p the number of independent
+        variables.
+    stderror : boolean
+        Whether the standard error should be computed
+        
+:Returns:
+    A new loess_predicted object, consisting of:
+    values : ndarray
+        The (m,) ndarray of loess values evaluated at newdata
+    stderr : ndarray
+        The (m,) ndarray of the estimates of the standard error on the estimated
+        values.
+    residual_scale : float
+        Estimate of the scale of the residuals
+    df : integer
+        Degrees of freedom of the t-distribution used to compute pointwise 
+        confidence intervals for the evaluated surface.
+    nest : integer
+        Number of new observations.
         """
-    newdata: ndarray
-        A (m,p) ndarray specifying the values of the predictors at which the 
-        evaluation is to be carried out.
-    stderr: Boolean
-        Logical flag for computing standard errors at newdata.
-        """
         cdef ndarray p_ndr
         cdef double *p_dat
         cdef c_loess.c_prediction _prediction
@@ -855,7 +861,7 @@
         # Test the compatibility of sizes .......
         if p_ndr.size == 0:
             raise ValueError("Can't predict without input data !")
-        (m, notOK) = divmod(len(p_ndr), self.npar)
+        (m, notOK) = divmod(len(p_ndr), self.inputs.npar)
         if notOK:
             raise ValueError(
                   "Incompatible data size: there should be as many rows as parameters")

Added: trunk/Lib/sandbox/pyloess/src/_mloess.c
===================================================================
--- trunk/Lib/sandbox/pyloess/src/_mloess.c	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/src/_mloess.c	2007-03-27 06:38:36 UTC (rev 2874)
@@ -0,0 +1,6807 @@
+/* Generated by Pyrex 0.9.5.1a on Sun Mar 25 18:15:14 2007 */
+
+#include "Python.h"
+#include "structmember.h"
+#ifndef PY_LONG_LONG
+  #define PY_LONG_LONG LONG_LONG
+#endif
+#ifdef __cplusplus
+#define __PYX_EXTERN_C extern "C"
+#else
+#define __PYX_EXTERN_C extern
+#endif
+__PYX_EXTERN_C double pow(double, double);
+#include "stdlib.h"
+#include "numpy/arrayobject.h"
+#include "loess.h"
+#include "cloess.h"
+
+
+typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
+typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
+
+static PyObject *__pyx_m;
+static PyObject *__pyx_b;
+static int __pyx_lineno;
+static char *__pyx_filename;
+static char **__pyx_f;
+
+static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
+
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+
+static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+
+static PyObject *__Pyx_UnpackItem(PyObject *); /*proto*/
+static int __Pyx_EndUnpack(PyObject *); /*proto*/
+
+static int __Pyx_PrintItem(PyObject *); /*proto*/
+static int __Pyx_PrintNewline(void); /*proto*/
+
+static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
+
+static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size);  /*proto*/
+
+static void __Pyx_AddTraceback(char *funcname); /*proto*/
+
+/* Declarations from c_python */
+
+
+/* Declarations from c_numpy */
+
+static PyTypeObject *__pyx_ptype_7c_numpy_dtype = 0;
+static PyTypeObject *__pyx_ptype_7c_numpy_ndarray = 0;
+static PyTypeObject *__pyx_ptype_7c_numpy_flatiter = 0;
+static PyTypeObject *__pyx_ptype_7c_numpy_broadcast = 0;
+
+/* Declarations from c_loess */
+
+
+/* Declarations from _mloess */
+
+
+struct __pyx_obj_7_mloess_loess_inputs {
+  PyObject_HEAD
+  loess_inputs (*_base);
+  PyArrayObject *w_ndr;
+  PyArrayObject *x;
+  PyArrayObject *y;
+  PyArrayObject *masked;
+  PyArrayObject *x_eff;
+  PyArrayObject *y_eff;
+  int nobs;
+  int nobs_eff;
+  int npar;
+};
+
+
+struct __pyx_obj_7_mloess_loess_control {
+  PyObject_HEAD
+  loess_control (*_base);
+};
+
+
+struct __pyx_obj_7_mloess_loess_kd_tree {
+  PyObject_HEAD
+  loess_kd_tree (*_base);
+};
+
+
+struct __pyx_obj_7_mloess_loess_model {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_7_mloess_loess_model *__pyx_vtab;
+  loess_model (*_base);
+  long npar;
+};
+
+struct __pyx_vtabstruct_7_mloess_loess_model {
+  PyObject *((*setup)(struct __pyx_obj_7_mloess_loess_model *,loess_model (*),long ));
+};
+static struct __pyx_vtabstruct_7_mloess_loess_model *__pyx_vtabptr_7_mloess_loess_model;
+
+
+struct __pyx_obj_7_mloess_loess_outputs {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_7_mloess_loess_outputs *__pyx_vtab;
+  loess_outputs (*_base);
+  long nobs;
+  long nobs_eff;
+  long npar;
+  PyArrayObject *masked;
+  PyArrayObject *unmasked;
+  int activated;
+  int ismasked;
+};
+
+struct __pyx_vtabstruct_7_mloess_loess_outputs {
+  PyObject *((*setup)(struct __pyx_obj_7_mloess_loess_outputs *,loess_outputs (*),long ,long ,long ,PyArrayObject *));
+  PyArrayObject *((*getoutput)(struct __pyx_obj_7_mloess_loess_outputs *,double (*)));
+};
+static struct __pyx_vtabstruct_7_mloess_loess_outputs *__pyx_vtabptr_7_mloess_loess_outputs;
+
+
+struct __pyx_obj_7_mloess_conf_intervals {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_7_mloess_conf_intervals *__pyx_vtab;
+  conf_inv _base;
+  PyArrayObject *lower;
+  PyArrayObject *fit;
+  PyArrayObject *upper;
+};
+
+struct __pyx_vtabstruct_7_mloess_conf_intervals {
+  PyObject *((*setup)(struct __pyx_obj_7_mloess_conf_intervals *,conf_inv ,long ));
+};
+static struct __pyx_vtabstruct_7_mloess_conf_intervals *__pyx_vtabptr_7_mloess_conf_intervals;
+
+
+struct __pyx_obj_7_mloess_loess_predicted {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_7_mloess_loess_predicted *__pyx_vtab;
+  prediction _base;
+  long nest;
+  struct __pyx_obj_7_mloess_conf_intervals *confidence_intervals;
+};
+
+struct __pyx_vtabstruct_7_mloess_loess_predicted {
+  PyObject *((*setup)(struct __pyx_obj_7_mloess_loess_predicted *,prediction ,long ));
+};
+static struct __pyx_vtabstruct_7_mloess_loess_predicted *__pyx_vtabptr_7_mloess_loess_predicted;
+
+
+struct __pyx_obj_7_mloess_loess {
+  PyObject_HEAD
+  loess _base;
+  struct __pyx_obj_7_mloess_loess_inputs *inputs;
+  struct __pyx_obj_7_mloess_loess_model *model;
+  struct __pyx_obj_7_mloess_loess_control *control;
+  struct __pyx_obj_7_mloess_loess_kd_tree *kd_tree;
+  struct __pyx_obj_7_mloess_loess_outputs *outputs;
+  struct __pyx_obj_7_mloess_loess_predicted *predicted;
+  long nobs;
+  long npar;
+};
+
+
+struct __pyx_obj_7_mloess_anova {
+  PyObject_HEAD
+  double dfn;
+  double dfd;
+  double F_value;
+  double Pr_F;
+};
+
+static PyTypeObject *__pyx_ptype_7_mloess_loess_inputs = 0;
+static PyTypeObject *__pyx_ptype_7_mloess_loess_control = 0;
+static PyTypeObject *__pyx_ptype_7_mloess_loess_kd_tree = 0;
+static PyTypeObject *__pyx_ptype_7_mloess_loess_model = 0;
+static PyTypeObject *__pyx_ptype_7_mloess_loess_outputs = 0;
+static PyTypeObject *__pyx_ptype_7_mloess_conf_intervals = 0;
+static PyTypeObject *__pyx_ptype_7_mloess_loess_predicted = 0;
+static PyTypeObject *__pyx_ptype_7_mloess_loess = 0;
+static PyTypeObject *__pyx_ptype_7_mloess_anova = 0;
+static PyObject *__pyx_k10;
+static PyObject *__pyx_k11;
+static PyObject *__pyx_k12;
+static PyObject *(__pyx_f_7_mloess_floatarray_from_data(int ,int ,double (*))); /*proto*/
+static PyObject *(__pyx_f_7_mloess_boolarray_from_data(int ,int ,int (*))); /*proto*/
+
+
+/* Implementation of _mloess */
+
+static char (__pyx_k1[]) = "A (n,) ndarray of weights to be given to individual observations in the \n        sum of squared residuals that forms the local fitting criterion. If not\n        None, the weights should be non negative. If the different observations\n        have non-equal variances, the weights should be inversely proportional \n        to the variances.\n        By default, an unweighted fit is carried out (all the weights are one).\n        ";
+static char (__pyx_k2[]) = "\n    surface : string [\"interpolate\"]\n        Determines whether the fitted surface is computed directly at all points\n        (\"direct\") or whether an interpolation method is used (\"interpolate\").\n        The default (\"interpolate\") is what most users should use unless special \n        circumstances warrant.\n        ";
+static char (__pyx_k3[]) = "\n    statistics : string [\"approximate\"]\n        Determines whether the statistical quantities are computed exactly \n        (\"exact\") or approximately (\"approximate\"). \"exact\" should only be used \n        for testing the approximation in statistical development and is not meant \n        for routine usage because computation time can be horrendous.\n        ";
+static char (__pyx_k4[]) = "\n    trace_hat : string [\"wait.to.decide\"]\n        Determines how the trace of the hat matrix should be computed. The hat\n        matrix is used in the computation of the statistical quantities. \n        If \"exact\", an exact computation is done; this could be slow when the\n        number of observations n becomes large. If \"wait.to.decide\" is selected, \n        then a default is \"exact\" for n < 500 and \"approximate\" otherwise. \n        This option is only useful when the fitted surface is interpolated. If  \n        surface is \"exact\", an exact computation is always done for the trace. \n        Setting trace_hat to \"approximate\" for large dataset will substantially \n        reduce the computation time.\n        ";
+static char (__pyx_k5[]) = "\n    iterations : integer\n        Number of iterations of the robust fitting method. If the family is \n        \"gaussian\", the number of iterations is set to 0.\n        ";
+static char (__pyx_k6[]) = "\n    cell : integer\n        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),\n        where n is the number of observations, and span the smoothing parameter.\n        Then, a cell is further divided if the number of observations within it \n        is greater than or equal to k. This option is only used if the surface \n        is interpolated.\n        ";
+static char (__pyx_k9[]) = "\n        \n\n    newdata : ndarray\n        The (m,p) array of independent variables where the surface must be estimated.\n    values : ndarray\n        The (m,) ndarray of loess values evaluated at newdata\n    stderr : ndarray\n        The (m,) ndarray of the estimates of the standard error on the estimated\n        values.\n    residual_scale : float\n        Estimate of the scale of the residuals\n    df : integer\n        Degrees of freedom of the t-distribution used to compute pointwise \n        confidence intervals for the evaluated surface.\n    nest : integer\n        Number of new observations.\n       \n        \n";
+
+static PyObject *__pyx_n_c_python;
+static PyObject *__pyx_n_c_numpy;
+static PyObject *__pyx_n_numpy;
+static PyObject *__pyx_n_narray;
+static PyObject *__pyx_n_float_;
+static PyObject *__pyx_n_maskedarray;
+static PyObject *__pyx_n_marray;
+static PyObject *__pyx_n_getmaskarray;
+static PyObject *__pyx_n_c_loess;
+static PyObject *__pyx_n_array;
+static PyObject *__pyx_n_masked_array;
+static PyObject *__pyx_n_False;
+
+static PyObject *__pyx_n_shape;
+
+static PyObject *__pyx_f_7_mloess_floatarray_from_data(int __pyx_v_rows,int __pyx_v_cols,double (*__pyx_v_data)) {
+  PyArrayObject *__pyx_v_a_ndr;
+  npy_intp __pyx_v_size;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  __pyx_v_a_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":23 */
+  __pyx_v_size = (__pyx_v_rows * __pyx_v_cols);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":24 */
+  __pyx_1 = PyArray_SimpleNewFromData(1,(&__pyx_v_size),NPY_DOUBLE,__pyx_v_data); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)__pyx_1));
+  Py_DECREF(((PyObject *)__pyx_v_a_ndr));
+  __pyx_v_a_ndr = ((PyArrayObject *)((PyObject *)__pyx_1));
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":25 */
+  __pyx_2 = (__pyx_v_cols > 1);
+  if (__pyx_2) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":26 */
+    __pyx_1 = PyInt_FromLong(__pyx_v_rows); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
+    __pyx_3 = PyInt_FromLong(__pyx_v_cols); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
+    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
+    __pyx_1 = 0;
+    __pyx_3 = 0;
+    if (PyObject_SetAttr(((PyObject *)__pyx_v_a_ndr), __pyx_n_shape, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":27 */
+  Py_INCREF(((PyObject *)__pyx_v_a_ndr));
+  __pyx_r = ((PyObject *)__pyx_v_a_ndr);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.floatarray_from_data");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_a_ndr);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_astype;
+static PyObject *__pyx_n_bool;
+
+static PyObject *__pyx_f_7_mloess_boolarray_from_data(int __pyx_v_rows,int __pyx_v_cols,int (*__pyx_v_data)) {
+  PyArrayObject *__pyx_v_a_ndr;
+  npy_intp __pyx_v_size;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  __pyx_v_a_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":32 */
+  __pyx_v_size = (__pyx_v_rows * __pyx_v_cols);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":33 */
+  __pyx_1 = PyArray_SimpleNewFromData(1,(&__pyx_v_size),NPY_DOUBLE,__pyx_v_data); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)__pyx_1));
+  Py_DECREF(((PyObject *)__pyx_v_a_ndr));
+  __pyx_v_a_ndr = ((PyArrayObject *)((PyObject *)__pyx_1));
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":34 */
+  __pyx_2 = (__pyx_v_cols > 1);
+  if (__pyx_2) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":35 */
+    __pyx_1 = PyInt_FromLong(__pyx_v_rows); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; goto __pyx_L1;}
+    __pyx_3 = PyInt_FromLong(__pyx_v_cols); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
+    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
+    __pyx_1 = 0;
+    __pyx_3 = 0;
+    if (PyObject_SetAttr(((PyObject *)__pyx_v_a_ndr), __pyx_n_shape, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":36 */
+  __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_a_ndr), __pyx_n_astype); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; goto __pyx_L1;}
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; goto __pyx_L1;}
+  __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_bool); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
+  __pyx_4 = 0;
+  __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_r = __pyx_4;
+  __pyx_4 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.boolarray_from_data");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_a_ndr);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_copy;
+static PyObject *__pyx_n_True;
+static PyObject *__pyx_n_subok;
+static PyObject *__pyx_n_dtype;
+static PyObject *__pyx_n_order;
+static PyObject *__pyx_n_C;
+static PyObject *__pyx_n_ndim;
+static PyObject *__pyx_n_mask_or;
+static PyObject *__pyx_n_small_mask;
+static PyObject *__pyx_n_any;
+static PyObject *__pyx_n_axis;
+static PyObject *__pyx_n_ValueError;
+static PyObject *__pyx_n_len;
+static PyObject *__pyx_n_sum;
+static PyObject *__pyx_n_logical_not;
+static PyObject *__pyx_n_ravel;
+static PyObject *__pyx_n_ones;
+
+static PyObject *__pyx_k26p;
+
+static char (__pyx_k26[]) = "The array of indepedent varibales should be 2D at most!";
+
+static int __pyx_f_7_mloess_12loess_inputs___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_f_7_mloess_12loess_inputs___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_x_data = 0;
+  PyObject *__pyx_v_y_data = 0;
+  PyArrayObject *__pyx_v_unmasked;
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  int __pyx_5;
+  PyObject *__pyx_6 = 0;
+  static char *__pyx_argnames[] = {"x_data","y_data",0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_x_data, &__pyx_v_y_data)) return -1;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_x_data);
+  Py_INCREF(__pyx_v_y_data);
+  __pyx_v_unmasked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":92 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_marray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_x_data);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x_data);
+  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_float_); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_dtype, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  if (PyDict_SetItem(__pyx_3, __pyx_n_order, __pyx_n_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x));
+  ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x = ((PyArrayObject *)__pyx_4);
+  __pyx_4 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":93 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_marray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_y_data);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_y_data);
+  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_float_); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_dtype, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  if (PyDict_SetItem(__pyx_3, __pyx_n_order, __pyx_n_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->y));
+  ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->y = ((PyArrayObject *)__pyx_4);
+  __pyx_4 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":95 */
+  __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x), __pyx_n_ndim); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
+  __pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
+  __pyx_5 = __pyx_5 == 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (__pyx_5) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":96 */
+    ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->npar = 1;
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":97 */
+    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_maskedarray); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_mask_or); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_getmaskarray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x));
+    PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x));
+    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_getmaskarray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;}
+    Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->y));
+    PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->y));
+    __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
+    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_6);
+    __pyx_3 = 0;
+    __pyx_6 = 0;
+    __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;}
+    if (PyDict_SetItem(__pyx_2, __pyx_n_small_mask, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_6 = PyEval_CallObjectWithKeywords(__pyx_4, __pyx_1, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    if (!__Pyx_TypeTest(__pyx_6, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; goto __pyx_L1;}
+    Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->masked));
+    ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->masked = ((PyArrayObject *)__pyx_6);
+    __pyx_6 = 0;
+    goto __pyx_L2;
+  }
+  __pyx_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x), __pyx_n_ndim); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
+  __pyx_4 = PyInt_FromLong(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_3, __pyx_4, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
+  __pyx_5 = __pyx_5 == 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  if (__pyx_5) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":101 */
+    __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x), __pyx_n_shape); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; goto __pyx_L1;}
+    __pyx_2 = PyInt_FromLong((-1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; goto __pyx_L1;}
+    __pyx_6 = PyObject_GetItem(__pyx_1, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_5 = PyInt_AsLong(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->npar = __pyx_5;
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":102 */
+    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_maskedarray); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_mask_or); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_getmaskarray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x));
+    PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x));
+    __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_3 = PyObject_GetAttr(__pyx_6, __pyx_n_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    __pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    if (PyDict_SetItem(__pyx_2, __pyx_n_axis, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    __pyx_6 = PyEval_CallObjectWithKeywords(__pyx_3, __pyx_1, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_getmaskarray); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L1;}
+    Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->y));
+    PyTuple_SET_ITEM(__pyx_1, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->y));
+    __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_6);
+    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
+    __pyx_6 = 0;
+    __pyx_2 = 0;
+    __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    __pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; goto __pyx_L1;}
+    if (PyDict_SetItem(__pyx_1, __pyx_n_small_mask, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    __pyx_2 = PyEval_CallObjectWithKeywords(__pyx_4, __pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; goto __pyx_L1;}
+    Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->masked));
+    ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->masked = ((PyArrayObject *)__pyx_2);
+    __pyx_2 = 0;
+    goto __pyx_L2;
+  }
+  /*else*/ {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":106 */
+    __pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
+    Py_INCREF(__pyx_k26p);
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k26p);
+    __pyx_3 = PyObject_CallObject(__pyx_6, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __Pyx_Raise(__pyx_3, 0, 0);
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; goto __pyx_L1;}
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":107 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x));
+  PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x));
+  __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_5 = PyInt_AsLong(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->nobs = __pyx_5;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":108 */
+  __pyx_4 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->nobs); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->masked), __pyx_n_sum); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; goto __pyx_L1;}
+  __pyx_1 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_2 = PyNumber_Subtract(__pyx_4, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_5 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->nobs_eff = __pyx_5;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":110 */
+  __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetAttr(__pyx_6, __pyx_n_logical_not); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->masked));
+  PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->masked));
+  __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_unmasked));
+  __pyx_v_unmasked = ((PyArrayObject *)__pyx_1);
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":111 */
+  __pyx_2 = PyObject_GetItem(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x), ((PyObject *)__pyx_v_unmasked)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_2, __pyx_n_ravel); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_3 = PyObject_CallObject(__pyx_6, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x_eff));
+  ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->x_eff = ((PyArrayObject *)__pyx_3);
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":112 */
+  __pyx_4 = PyObject_GetItem(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->y), ((PyObject *)__pyx_v_unmasked)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->y_eff));
+  ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->y_eff = ((PyArrayObject *)__pyx_4);
+  __pyx_4 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":113 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_ones); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_6 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->nobs); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_6);
+  __pyx_6 = 0;
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
+  __pyx_3 = 0;
+  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_float_); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_1, __pyx_n_dtype, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_3 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->w_ndr));
+  ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->w_ndr = ((PyArrayObject *)__pyx_3);
+  __pyx_3 = 0;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_6);
+  __Pyx_AddTraceback("_mloess.loess_inputs.__init__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_unmasked);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_x_data);
+  Py_DECREF(__pyx_v_y_data);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_12loess_inputs_7weights___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_12loess_inputs_7weights___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":124 */
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->w_ndr));
+  __pyx_r = ((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->w_ndr);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_size;
+static PyObject *__pyx_n_data;
+
+static PyObject *__pyx_k31p;
+
+static char (__pyx_k31[]) = "Invalid size of the 'weights' vector!";
+
+static int __pyx_f_7_mloess_12loess_inputs_7weights___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_w); /*proto*/
+static int __pyx_f_7_mloess_12loess_inputs_7weights___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_w) {
+  PyArrayObject *__pyx_v_w_ndr;
+  PyArrayObject *__pyx_v_unmasked;
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  int __pyx_5;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_w);
+  __pyx_v_w_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  __pyx_v_unmasked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":129 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_logical_not); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->masked));
+  PyTuple_SET_ITEM(__pyx_1, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->masked));
+  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_unmasked));
+  __pyx_v_unmasked = ((PyArrayObject *)__pyx_3);
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":130 */
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_w);
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_w);
+  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_float_); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_dtype, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_w_ndr));
+  __pyx_v_w_ndr = ((PyArrayObject *)__pyx_4);
+  __pyx_4 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":131 */
+  __pyx_2 = PyObject_GetAttr(((PyObject *)__pyx_v_w_ndr), __pyx_n_ndim); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
+  __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_2, __pyx_1, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
+  __pyx_5 = __pyx_5 > 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (!__pyx_5) {
+    __pyx_3 = PyObject_GetAttr(((PyObject *)__pyx_v_w_ndr), __pyx_n_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
+    __pyx_4 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->nobs); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
+    if (PyObject_Cmp(__pyx_3, __pyx_4, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; goto __pyx_L1;}
+    __pyx_5 = __pyx_5 != 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+  }
+  if (__pyx_5) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":132 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;}
+    __Pyx_Raise(__pyx_2, __pyx_k31p, 0);
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":133 */
+  Py_INCREF(((PyObject *)__pyx_v_w_ndr));
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->w_ndr));
+  ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->w_ndr = __pyx_v_w_ndr;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":134 */
+  __pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_w_ndr), ((PyObject *)__pyx_v_unmasked)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_data); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_v_self)->_base->weights = ((double (*))__pyx_3);
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_inputs.weights.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_w_ndr);
+  Py_DECREF(__pyx_v_unmasked);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_w);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_control_7surface___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_control_7surface___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":185 */
+  __pyx_1 = PyString_FromString(((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->surface); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_control.surface.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_lower;
+static PyObject *__pyx_n_interpolate;
+static PyObject *__pyx_n_direct;
+
+static PyObject *__pyx_k34p;
+static PyObject *__pyx_k35p;
+
+static char (__pyx_k34[]) = "Invalid value for the 'surface' argument: ";
+static char (__pyx_k35[]) = "should be in ('interpolate', 'direct').";
+
+static int __pyx_f_7_mloess_13loess_control_7surface___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_surface); /*proto*/
+static int __pyx_f_7_mloess_13loess_control_7surface___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_surface) {
+  PyObject *__pyx_v_tmpx;
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  int __pyx_3;
+  PyObject *__pyx_4 = 0;
+  char (*__pyx_5);
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_surface);
+  __pyx_v_tmpx = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":187 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_surface, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_interpolate);
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_interpolate);
+  Py_INCREF(__pyx_n_direct);
+  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_direct);
+  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; goto __pyx_L1;}
+  __pyx_3 = !__pyx_3;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_3) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":188 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;}
+    __pyx_1 = PyNumber_Add(__pyx_k34p, __pyx_k35p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
+    __pyx_1 = 0;
+    __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __Pyx_Raise(__pyx_1, 0, 0);
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":190 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_surface, __pyx_n_lower); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;}
+  __pyx_4 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_tmpx);
+  __pyx_v_tmpx = __pyx_4;
+  __pyx_4 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":191 */
+  __pyx_5 = PyString_AsString(__pyx_v_tmpx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->surface = __pyx_5;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_control.surface.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_tmpx);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_surface);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_control_10statistics___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_control_10statistics___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":202 */
+  __pyx_1 = PyString_FromString(((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->statistics); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_control.statistics.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_approximate;
+static PyObject *__pyx_n_exact;
+
+static PyObject *__pyx_k38p;
+
+static char (__pyx_k38[]) = "Invalid value for the 'statistics' argument: should be in ('approximate', 'exact').";
+
+static int __pyx_f_7_mloess_13loess_control_10statistics___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_statistics); /*proto*/
+static int __pyx_f_7_mloess_13loess_control_10statistics___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_statistics) {
+  PyObject *__pyx_v_tmpx;
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  int __pyx_3;
+  PyObject *__pyx_4 = 0;
+  char (*__pyx_5);
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_statistics);
+  __pyx_v_tmpx = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":204 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_statistics, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_approximate);
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_approximate);
+  Py_INCREF(__pyx_n_exact);
+  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_exact);
+  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; goto __pyx_L1;}
+  __pyx_3 = !__pyx_3;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_3) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":205 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
+    Py_INCREF(__pyx_k38p);
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k38p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":207 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_statistics, __pyx_n_lower); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
+  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_tmpx);
+  __pyx_v_tmpx = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":208 */
+  __pyx_5 = PyString_AsString(__pyx_v_tmpx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->statistics = __pyx_5;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_control.statistics.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_tmpx);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_statistics);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_control_9trace_hat___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_control_9trace_hat___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":224 */
+  __pyx_1 = PyString_FromString(((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->trace_hat); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_control.trace_hat.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k41p;
+
+static char (__pyx_k41[]) = "Invalid value for the 'trace_hat' argument: should be in ('approximate', 'exact').";
+
+static int __pyx_f_7_mloess_13loess_control_9trace_hat___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_trace_hat); /*proto*/
+static int __pyx_f_7_mloess_13loess_control_9trace_hat___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_trace_hat) {
+  PyObject *__pyx_v_tmpx;
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  int __pyx_3;
+  PyObject *__pyx_4 = 0;
+  char (*__pyx_5);
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_trace_hat);
+  __pyx_v_tmpx = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":226 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_trace_hat, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_approximate);
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_approximate);
+  Py_INCREF(__pyx_n_exact);
+  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_exact);
+  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; goto __pyx_L1;}
+  __pyx_3 = !__pyx_3;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_3) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":227 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;}
+    Py_INCREF(__pyx_k41p);
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k41p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":229 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_trace_hat, __pyx_n_lower); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; goto __pyx_L1;}
+  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_tmpx);
+  __pyx_v_tmpx = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":230 */
+  __pyx_5 = PyString_AsString(__pyx_v_tmpx); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->trace_hat = __pyx_5;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_control.trace_hat.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_tmpx);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_trace_hat);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_control_10iterations___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_control_10iterations___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":239 */
+  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->iterations); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_control.iterations.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k42p;
+
+static char (__pyx_k42[]) = "Invalid number of iterations: should be positive";
+
+static int __pyx_f_7_mloess_13loess_control_10iterations___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_iterations); /*proto*/
+static int __pyx_f_7_mloess_13loess_control_10iterations___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_iterations) {
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_iterations);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":241 */
+  __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_iterations, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; goto __pyx_L1;}
+  __pyx_2 = __pyx_2 < 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_2) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":242 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; goto __pyx_L1;}
+    Py_INCREF(__pyx_k42p);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k42p);
+    __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":243 */
+  __pyx_2 = PyInt_AsLong(__pyx_v_iterations); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->iterations = __pyx_2;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_control.iterations.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_iterations);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_control_4cell___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_control_4cell___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":255 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->cell); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_control.cell.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k43p;
+
+static char (__pyx_k43[]) = "Invalid value for the cell argument: should be positive";
+
+static int __pyx_f_7_mloess_13loess_control_4cell___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cell); /*proto*/
+static int __pyx_f_7_mloess_13loess_control_4cell___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_cell) {
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  double __pyx_5;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_cell);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":257 */
+  __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_cell, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; goto __pyx_L1;}
+  __pyx_2 = __pyx_2 <= 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_2) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":258 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
+    Py_INCREF(__pyx_k43p);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k43p);
+    __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":259 */
+  __pyx_5 = PyFloat_AsDouble(__pyx_v_cell); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_loess_control *)__pyx_v_self)->_base->cell = __pyx_5;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_control.cell.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_cell);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_get;
+static PyObject *__pyx_n_surface;
+static PyObject *__pyx_n_statistics;
+static PyObject *__pyx_n_trace_hat;
+static PyObject *__pyx_n_iterations;
+static PyObject *__pyx_n_cell;
+static PyObject *__pyx_n_parametric_flags;
+
+
+static PyObject *__pyx_f_7_mloess_13loess_control_update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7_mloess_13loess_control_update[] = "Updates several parameters at once.";
+static PyObject *__pyx_f_7_mloess_13loess_control_update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_cellargs = 0;
+  PyObject *__pyx_v_surface;
+  PyObject *__pyx_v_statistics;
+  PyObject *__pyx_v_trace_hat;
+  PyObject *__pyx_v_iterations;
+  PyObject *__pyx_v_cell;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  int __pyx_4;
+  static char *__pyx_argnames[] = {0};
+  if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, 0, &__pyx_v_cellargs) < 0) return 0;
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) {
+    Py_XDECREF(__pyx_args);
+    Py_XDECREF(__pyx_kwds);
+    Py_XDECREF(__pyx_v_cellargs);
+    return 0;
+  }
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_surface = Py_None; Py_INCREF(Py_None);
+  __pyx_v_statistics = Py_None; Py_INCREF(Py_None);
+  __pyx_v_trace_hat = Py_None; Py_INCREF(Py_None);
+  __pyx_v_iterations = Py_None; Py_INCREF(Py_None);
+  __pyx_v_cell = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":263 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_surface);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_surface);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_surface);
+  __pyx_v_surface = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":264 */
+  __pyx_4 = __pyx_v_surface != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":265 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_surface, __pyx_v_surface) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":267 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_statistics);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_statistics);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_statistics);
+  __pyx_v_statistics = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":268 */
+  __pyx_4 = __pyx_v_statistics != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":269 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_statistics, __pyx_v_statistics) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; goto __pyx_L1;}
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":271 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_trace_hat);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_trace_hat);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_trace_hat);
+  __pyx_v_trace_hat = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":272 */
+  __pyx_4 = __pyx_v_trace_hat != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":273 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_trace_hat, __pyx_v_trace_hat) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; goto __pyx_L1;}
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":275 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_iterations);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_iterations);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_iterations);
+  __pyx_v_iterations = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":276 */
+  __pyx_4 = __pyx_v_iterations != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":277 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_iterations, __pyx_v_iterations) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; goto __pyx_L1;}
+    goto __pyx_L5;
+  }
+  __pyx_L5:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":279 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_cellargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_cell);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_cell);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_cell);
+  __pyx_v_cell = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":280 */
+  __pyx_4 = __pyx_v_cell != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":281 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_parametric_flags, __pyx_v_cell) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; goto __pyx_L1;}
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("_mloess.loess_control.update");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_XDECREF(__pyx_v_cellargs);
+  Py_DECREF(__pyx_v_surface);
+  Py_DECREF(__pyx_v_statistics);
+  Py_DECREF(__pyx_v_trace_hat);
+  Py_DECREF(__pyx_v_iterations);
+  Py_DECREF(__pyx_v_cell);
+  Py_DECREF(__pyx_v_self);
+  Py_XDECREF(__pyx_args);
+  Py_XDECREF(__pyx_kwds);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_join;
+
+static PyObject *__pyx_k49p;
+static PyObject *__pyx_k50p;
+static PyObject *__pyx_k51p;
+static PyObject *__pyx_k52p;
+static PyObject *__pyx_k53p;
+static PyObject *__pyx_k54p;
+static PyObject *__pyx_k55p;
+
+static char (__pyx_k49[]) = "Control          :";
+static char (__pyx_k50[]) = "Surface type     : %s";
+static char (__pyx_k51[]) = "Statistics       : %s";
+static char (__pyx_k52[]) = "Trace estimation : %s";
+static char (__pyx_k53[]) = "Cell size        : %s";
+static char (__pyx_k54[]) = "Nb iterations    : %s";
+static char (__pyx_k55[]) = "\n";
+
+static PyObject *__pyx_f_7_mloess_13loess_control___str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_control___str__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_v_strg;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  PyObject *__pyx_6 = 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_strg = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":285 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_surface); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k50p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_statistics); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
+  __pyx_3 = PyNumber_Remainder(__pyx_k51p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_trace_hat); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Remainder(__pyx_k52p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_cell); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
+  __pyx_5 = PyNumber_Remainder(__pyx_k53p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_iterations); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
+  __pyx_6 = PyNumber_Remainder(__pyx_k54p, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyList_New(6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; goto __pyx_L1;}
+  Py_INCREF(__pyx_k49p);
+  PyList_SET_ITEM(__pyx_1, 0, __pyx_k49p);
+  PyList_SET_ITEM(__pyx_1, 1, __pyx_2);
+  PyList_SET_ITEM(__pyx_1, 2, __pyx_3);
+  PyList_SET_ITEM(__pyx_1, 3, __pyx_4);
+  PyList_SET_ITEM(__pyx_1, 4, __pyx_5);
+  PyList_SET_ITEM(__pyx_1, 5, __pyx_6);
+  __pyx_2 = 0;
+  __pyx_3 = 0;
+  __pyx_4 = 0;
+  __pyx_5 = 0;
+  __pyx_6 = 0;
+  Py_DECREF(__pyx_v_strg);
+  __pyx_v_strg = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":291 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k55p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_strg);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_strg);
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_r = __pyx_4;
+  __pyx_4 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  Py_XDECREF(__pyx_6);
+  __Pyx_AddTraceback("_mloess.loess_control.__str__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_strg);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_11loess_model_setup(struct __pyx_obj_7_mloess_loess_model *__pyx_v_self,loess_model (*__pyx_v_base),long __pyx_v_npar) {
+  PyObject *__pyx_r;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":346 */
+  __pyx_v_self->_base = __pyx_v_base;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":347 */
+  __pyx_v_self->npar = __pyx_v_npar;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":348 */
+  Py_INCREF(((PyObject *)__pyx_v_self));
+  __pyx_r = ((PyObject *)__pyx_v_self);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_11loess_model_9normalize___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_11loess_model_9normalize___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":352 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;}
+  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->normalize); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_r = __pyx_2;
+  __pyx_2 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("_mloess.loess_model.normalize.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static int __pyx_f_7_mloess_11loess_model_9normalize___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_normalize); /*proto*/
+static int __pyx_f_7_mloess_11loess_model_9normalize___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_normalize) {
+  int __pyx_r;
+  int __pyx_1;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_normalize);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":354 */
+  __pyx_1 = PyInt_AsLong(__pyx_v_normalize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->normalize = __pyx_1;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  __Pyx_AddTraceback("_mloess.loess_model.normalize.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_normalize);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_11loess_model_4span___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_11loess_model_4span___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":358 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->span); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_model.span.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k56p;
+
+static char (__pyx_k56[]) = "Span should be between 0 and 1!";
+
+static int __pyx_f_7_mloess_11loess_model_4span___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_span); /*proto*/
+static int __pyx_f_7_mloess_11loess_model_4span___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_span) {
+  int __pyx_r;
+  int __pyx_1;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  double __pyx_5;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_span);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":360 */
+  __pyx_2 = PyFloat_FromDouble(0.); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_span, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
+  __pyx_1 = __pyx_1 <= 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (!__pyx_1) {
+    __pyx_2 = PyFloat_FromDouble(1.); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
+    if (PyObject_Cmp(__pyx_v_span, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; goto __pyx_L1;}
+    __pyx_1 = __pyx_1 > 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+  }
+  if (__pyx_1) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":361 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
+    Py_INCREF(__pyx_k56p);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k56p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":362 */
+  __pyx_5 = PyFloat_AsDouble(__pyx_v_span); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->span = __pyx_5;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_model.span.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_span);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_11loess_model_6degree___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_11loess_model_6degree___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":366 */
+  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->degree); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_model.degree.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k57p;
+
+static char (__pyx_k57[]) = "Degree should be between 0 and 2!";
+
+static int __pyx_f_7_mloess_11loess_model_6degree___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_degree); /*proto*/
+static int __pyx_f_7_mloess_11loess_model_6degree___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_degree) {
+  int __pyx_r;
+  int __pyx_1;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_degree);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":368 */
+  __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_degree, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
+  __pyx_1 = __pyx_1 < 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (!__pyx_1) {
+    __pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
+    if (PyObject_Cmp(__pyx_v_degree, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; goto __pyx_L1;}
+    __pyx_1 = __pyx_1 > 0;
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+  }
+  if (__pyx_1) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":369 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;}
+    Py_INCREF(__pyx_k57p);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k57p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":370 */
+  __pyx_1 = PyInt_AsLong(__pyx_v_degree); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->degree = __pyx_1;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_model.degree.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_degree);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_11loess_model_6family___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_11loess_model_6family___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":374 */
+  __pyx_1 = PyString_FromString(((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->family); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_model.family.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_symmetric;
+static PyObject *__pyx_n_gaussian;
+
+static PyObject *__pyx_k60p;
+
+static char (__pyx_k60[]) = "Invalid value for the 'family' argument: should be in ('symmetric', 'gaussian').";
+
+static int __pyx_f_7_mloess_11loess_model_6family___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_family); /*proto*/
+static int __pyx_f_7_mloess_11loess_model_6family___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_family) {
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  int __pyx_3;
+  PyObject *__pyx_4 = 0;
+  char (*__pyx_5);
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_family);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":376 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_family, __pyx_n_lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_symmetric);
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_symmetric);
+  Py_INCREF(__pyx_n_gaussian);
+  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_n_gaussian);
+  __pyx_3 = PySequence_Contains(__pyx_1, __pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
+  __pyx_3 = !__pyx_3;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_3) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":377 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;}
+    Py_INCREF(__pyx_k60p);
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k60p);
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":379 */
+  __pyx_5 = PyString_AsString(__pyx_v_family); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->family = __pyx_5;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_model.family.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_family);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_11loess_model_16parametric_flags___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_11loess_model_16parametric_flags___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":383 */
+  __pyx_1 = __pyx_f_7_mloess_boolarray_from_data(((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->npar,1,((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->parametric); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_model.parametric_flags.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_atleast_1d;
+static PyObject *__pyx_n_min;
+
+
+static int __pyx_f_7_mloess_11loess_model_16parametric_flags___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_paramf); /*proto*/
+static int __pyx_f_7_mloess_11loess_model_16parametric_flags___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_paramf) {
+  PyArrayObject *__pyx_v_p_ndr;
+  int __pyx_v_i;
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  PyObject *__pyx_6 = 0;
+  long __pyx_7;
+  int __pyx_8;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_paramf);
+  __pyx_v_p_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":387 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_atleast_1d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_paramf);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_paramf);
+  __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_copy, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_subok, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_5, __pyx_n_bool); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  if (PyDict_SetItem(__pyx_4, __pyx_n_dtype, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
+  __pyx_5 = 0;
+  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_p_ndr));
+  __pyx_v_p_ndr = ((PyArrayObject *)__pyx_1);
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":389 */
+  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_min); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
+  __pyx_4 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->npar); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
+  __pyx_5 = PyObject_GetAttr(((PyObject *)__pyx_v_p_ndr), __pyx_n_size); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
+  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5);
+  __pyx_4 = 0;
+  __pyx_5 = 0;
+  __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_7 = PyInt_AsLong(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  for (__pyx_v_i = 0; __pyx_v_i < __pyx_7; ++__pyx_v_i) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":390 */
+    __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L1;}
+    __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_p_ndr), __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __pyx_8 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    (((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->parametric[__pyx_v_i]) = __pyx_8;
+  }
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  Py_XDECREF(__pyx_6);
+  __Pyx_AddTraceback("_mloess.loess_model.parametric_flags.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_p_ndr);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_paramf);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_11loess_model_17drop_square_flags___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_11loess_model_17drop_square_flags___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":394 */
+  __pyx_1 = __pyx_f_7_mloess_boolarray_from_data(((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->npar,1,((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->drop_square); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_model.drop_square_flags.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+
+static int __pyx_f_7_mloess_11loess_model_17drop_square_flags___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_drop_sq); /*proto*/
+static int __pyx_f_7_mloess_11loess_model_17drop_square_flags___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_drop_sq) {
+  PyArrayObject *__pyx_v_d_ndr;
+  int __pyx_v_i;
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  PyObject *__pyx_6 = 0;
+  long __pyx_7;
+  int __pyx_8;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_drop_sq);
+  __pyx_v_d_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":398 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_atleast_1d); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_drop_sq);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_drop_sq);
+  __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_copy, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_subok, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_5, __pyx_n_bool); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  if (PyDict_SetItem(__pyx_4, __pyx_n_dtype, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
+  __pyx_5 = 0;
+  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_d_ndr));
+  __pyx_v_d_ndr = ((PyArrayObject *)__pyx_1);
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":400 */
+  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_min); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
+  __pyx_4 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->npar); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
+  __pyx_5 = PyObject_GetAttr(((PyObject *)__pyx_v_d_ndr), __pyx_n_size); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
+  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5);
+  __pyx_4 = 0;
+  __pyx_5 = 0;
+  __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_7 = PyInt_AsLong(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  for (__pyx_v_i = 0; __pyx_v_i < __pyx_7; ++__pyx_v_i) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":401 */
+    __pyx_1 = PyInt_FromLong(__pyx_v_i); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
+    __pyx_4 = PyObject_GetItem(((PyObject *)__pyx_v_d_ndr), __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __pyx_8 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    (((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->_base->drop_square[__pyx_v_i]) = __pyx_8;
+  }
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  Py_XDECREF(__pyx_6);
+  __Pyx_AddTraceback("_mloess.loess_model.drop_square_flags.__set__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_d_ndr);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_drop_sq);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_family;
+static PyObject *__pyx_n_span;
+static PyObject *__pyx_n_degree;
+static PyObject *__pyx_n_normalize;
+static PyObject *__pyx_n_parametric;
+static PyObject *__pyx_n_drop_square;
+static PyObject *__pyx_n_drop_square_flags;
+
+
+static PyObject *__pyx_f_7_mloess_11loess_model_update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_f_7_mloess_11loess_model_update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_modelargs = 0;
+  PyObject *__pyx_v_family;
+  PyObject *__pyx_v_span;
+  PyObject *__pyx_v_degree;
+  PyObject *__pyx_v_normalize;
+  PyObject *__pyx_v_parametric;
+  PyObject *__pyx_v_drop_square;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  int __pyx_4;
+  static char *__pyx_argnames[] = {0};
+  if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 0, 0, &__pyx_v_modelargs) < 0) return 0;
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) {
+    Py_XDECREF(__pyx_args);
+    Py_XDECREF(__pyx_kwds);
+    Py_XDECREF(__pyx_v_modelargs);
+    return 0;
+  }
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_family = Py_None; Py_INCREF(Py_None);
+  __pyx_v_span = Py_None; Py_INCREF(Py_None);
+  __pyx_v_degree = Py_None; Py_INCREF(Py_None);
+  __pyx_v_normalize = Py_None; Py_INCREF(Py_None);
+  __pyx_v_parametric = Py_None; Py_INCREF(Py_None);
+  __pyx_v_drop_square = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":404 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_family);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_family);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_family);
+  __pyx_v_family = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":405 */
+  __pyx_4 = __pyx_v_family != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":406 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_family, __pyx_v_family) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":408 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_span);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_span);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_span);
+  __pyx_v_span = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":409 */
+  __pyx_4 = __pyx_v_span != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":410 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_span, __pyx_v_span) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; goto __pyx_L1;}
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":412 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_degree);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_degree);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_degree);
+  __pyx_v_degree = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":413 */
+  __pyx_4 = __pyx_v_degree != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":414 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_degree, __pyx_v_degree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L1;}
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":416 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_normalize);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_normalize);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_normalize);
+  __pyx_v_normalize = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":417 */
+  __pyx_4 = __pyx_v_normalize != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":418 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_normalize, __pyx_v_normalize) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; goto __pyx_L1;}
+    goto __pyx_L5;
+  }
+  __pyx_L5:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":420 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_parametric);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_parametric);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_parametric);
+  __pyx_v_parametric = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":421 */
+  __pyx_4 = __pyx_v_parametric != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":422 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_parametric_flags, __pyx_v_parametric) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; goto __pyx_L1;}
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":424 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_modelargs, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
+  Py_INCREF(__pyx_n_drop_square);
+  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_drop_square);
+  Py_INCREF(Py_None);
+  PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_v_drop_square);
+  __pyx_v_drop_square = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":425 */
+  __pyx_4 = __pyx_v_drop_square != Py_None;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":426 */
+    if (PyObject_SetAttr(__pyx_v_self, __pyx_n_drop_square_flags, __pyx_v_drop_square) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;}
+    goto __pyx_L7;
+  }
+  __pyx_L7:;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("_mloess.loess_model.update");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_XDECREF(__pyx_v_modelargs);
+  Py_DECREF(__pyx_v_family);
+  Py_DECREF(__pyx_v_span);
+  Py_DECREF(__pyx_v_degree);
+  Py_DECREF(__pyx_v_normalize);
+  Py_DECREF(__pyx_v_parametric);
+  Py_DECREF(__pyx_v_drop_square);
+  Py_DECREF(__pyx_v_self);
+  Py_XDECREF(__pyx_args);
+  Py_XDECREF(__pyx_kwds);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k73p;
+
+static char (__pyx_k73[]) = "<loess object: model parameters>";
+
+static PyObject *__pyx_f_7_mloess_11loess_model___repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_11loess_model___repr__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":429 */
+  Py_INCREF(__pyx_k73p);
+  __pyx_r = __pyx_k73p;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k74p;
+static PyObject *__pyx_k75p;
+static PyObject *__pyx_k76p;
+static PyObject *__pyx_k77p;
+static PyObject *__pyx_k78p;
+static PyObject *__pyx_k79p;
+static PyObject *__pyx_k80p;
+static PyObject *__pyx_k81p;
+
+static char (__pyx_k74[]) = "Model parameters.....";
+static char (__pyx_k75[]) = "Family          : %s";
+static char (__pyx_k76[]) = "Span            : %s";
+static char (__pyx_k77[]) = "Degree          : %s";
+static char (__pyx_k78[]) = "Normalized      : %s";
+static char (__pyx_k79[]) = "Parametric      : %s";
+static char (__pyx_k80[]) = "Drop_square     : %s";
+static char (__pyx_k81[]) = "\n";
+
+static PyObject *__pyx_f_7_mloess_11loess_model___str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_11loess_model___str__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_v_strg;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  PyObject *__pyx_6 = 0;
+  PyObject *__pyx_7 = 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_strg = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":432 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_family); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k75p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_span); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
+  __pyx_3 = PyNumber_Remainder(__pyx_k76p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_degree); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Remainder(__pyx_k77p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_normalize); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;}
+  __pyx_5 = PyNumber_Remainder(__pyx_k78p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_parametric_flags); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
+  __pyx_6 = PySequence_GetSlice(__pyx_1, 0, ((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->npar); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyNumber_Remainder(__pyx_k79p, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_drop_square_flags); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; goto __pyx_L1;}
+  __pyx_7 = PySequence_GetSlice(__pyx_6, 0, ((struct __pyx_obj_7_mloess_loess_model *)__pyx_v_self)->npar); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_6 = PyNumber_Remainder(__pyx_k80p, __pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; goto __pyx_L1;}
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  __pyx_7 = PyList_New(7); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; goto __pyx_L1;}
+  Py_INCREF(__pyx_k74p);
+  PyList_SET_ITEM(__pyx_7, 0, __pyx_k74p);
+  PyList_SET_ITEM(__pyx_7, 1, __pyx_2);
+  PyList_SET_ITEM(__pyx_7, 2, __pyx_3);
+  PyList_SET_ITEM(__pyx_7, 3, __pyx_4);
+  PyList_SET_ITEM(__pyx_7, 4, __pyx_5);
+  PyList_SET_ITEM(__pyx_7, 5, __pyx_1);
+  PyList_SET_ITEM(__pyx_7, 6, __pyx_6);
+  __pyx_2 = 0;
+  __pyx_3 = 0;
+  __pyx_4 = 0;
+  __pyx_5 = 0;
+  __pyx_1 = 0;
+  __pyx_6 = 0;
+  Py_DECREF(__pyx_v_strg);
+  __pyx_v_strg = __pyx_7;
+  __pyx_7 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":440 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k81p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_strg);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_strg);
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_r = __pyx_4;
+  __pyx_4 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  Py_XDECREF(__pyx_6);
+  Py_XDECREF(__pyx_7);
+  __Pyx_AddTraceback("_mloess.loess_model.__str__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_strg);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_setup(struct __pyx_obj_7_mloess_loess_outputs *__pyx_v_self,loess_outputs (*__pyx_v_base),long __pyx_v_nobs,long __pyx_v_nobs_eff,long __pyx_v_npar,PyArrayObject *__pyx_v_mask) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  int __pyx_4;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_mask);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":482 */
+  __pyx_v_self->_base = __pyx_v_base;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":483 */
+  __pyx_v_self->nobs = __pyx_v_nobs;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":484 */
+  __pyx_v_self->nobs_eff = __pyx_v_nobs_eff;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":485 */
+  __pyx_v_self->npar = __pyx_v_npar;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":486 */
+  Py_INCREF(((PyObject *)__pyx_v_mask));
+  Py_DECREF(((PyObject *)__pyx_v_self->masked));
+  __pyx_v_self->masked = __pyx_v_mask;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":487 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_logical_not); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)__pyx_v_mask));
+  PyTuple_SET_ITEM(__pyx_1, 0, ((PyObject *)__pyx_v_mask));
+  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_self->unmasked));
+  __pyx_v_self->unmasked = ((PyArrayObject *)__pyx_3);
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":488 */
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;}
+  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_v_self->activated = __pyx_4;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":489 */
+  __pyx_1 = PyObject_GetAttr(((PyObject *)__pyx_v_mask), __pyx_n_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;}
+  __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_v_self->ismasked = __pyx_4;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("_mloess.loess_outputs.setup");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_mask);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_empty;
+static PyObject *__pyx_n_mask;
+static PyObject *__pyx_n_flat;
+
+
+static PyArrayObject *__pyx_f_7_mloess_13loess_outputs_getoutput(struct __pyx_obj_7_mloess_loess_outputs *__pyx_v_self,double (*__pyx_v_data)) {
+  PyArrayObject *__pyx_v_out_ndr;
+  PyArrayObject *__pyx_v_tmp_ndr;
+  PyArrayObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  PyObject *__pyx_6 = 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_out_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  __pyx_v_tmp_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":493 */
+  __pyx_1 = __pyx_f_7_mloess_floatarray_from_data(__pyx_v_self->nobs_eff,1,__pyx_v_data); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_tmp_ndr));
+  __pyx_v_tmp_ndr = ((PyArrayObject *)__pyx_1);
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":494 */
+  __pyx_2 = (!__pyx_v_self->ismasked);
+  if (__pyx_2) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":495 */
+    Py_INCREF(((PyObject *)__pyx_v_tmp_ndr));
+    __pyx_r = __pyx_v_tmp_ndr;
+    goto __pyx_L0;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":496 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_marray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_empty); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_3 = PyInt_FromLong(__pyx_v_self->nobs); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
+  __pyx_3 = 0;
+  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_float_); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
+  PyTuple_SET_ITEM(__pyx_6, 1, __pyx_3);
+  __pyx_5 = 0;
+  __pyx_3 = 0;
+  __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5);
+  __pyx_5 = 0;
+  __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_4, __pyx_n_mask, ((PyObject *)__pyx_v_self->masked)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  __pyx_6 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_3, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  if (!__Pyx_TypeTest(__pyx_6, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_out_ndr));
+  __pyx_v_out_ndr = ((PyArrayObject *)__pyx_6);
+  __pyx_6 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":497 */
+  __pyx_5 = PyObject_GetAttr(((PyObject *)__pyx_v_tmp_ndr), __pyx_n_flat); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
+  if (PyObject_SetItem(((PyObject *)__pyx_v_out_ndr), ((PyObject *)__pyx_v_self->unmasked), __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":498 */
+  Py_INCREF(((PyObject *)__pyx_v_out_ndr));
+  __pyx_r = __pyx_v_out_ndr;
+  goto __pyx_L0;
+
+  __pyx_r = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  Py_XDECREF(__pyx_6);
+  __Pyx_AddTraceback("_mloess.loess_outputs.getoutput");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_out_ndr);
+  Py_DECREF(__pyx_v_tmp_ndr);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_13fitted_values___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_13fitted_values___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":502 */
+  __pyx_1 = ((PyObject *)((struct __pyx_vtabstruct_7_mloess_loess_outputs *)((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->__pyx_vtab)->getoutput(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self),((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->fitted_values)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.fitted_values.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_16fitted_residuals___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_16fitted_residuals___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":506 */
+  __pyx_1 = ((PyObject *)((struct __pyx_vtabstruct_7_mloess_loess_outputs *)((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->__pyx_vtab)->getoutput(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self),((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->fitted_residuals)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.fitted_residuals.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_12pseudovalues___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_12pseudovalues___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":510 */
+  __pyx_1 = ((PyObject *)((struct __pyx_vtabstruct_7_mloess_loess_outputs *)((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->__pyx_vtab)->getoutput(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self),((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->pseudovalues)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.pseudovalues.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_8diagonal___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_8diagonal___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":514 */
+  __pyx_1 = ((PyObject *)((struct __pyx_vtabstruct_7_mloess_loess_outputs *)((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->__pyx_vtab)->getoutput(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self),((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->diagonal)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.diagonal.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_6robust___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_6robust___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":518 */
+  __pyx_1 = ((PyObject *)((struct __pyx_vtabstruct_7_mloess_loess_outputs *)((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->__pyx_vtab)->getoutput(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self),((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->robust)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.robust.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_7divisor___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_7divisor___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":522 */
+  __pyx_1 = __pyx_f_7_mloess_floatarray_from_data(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->npar,1,((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->divisor); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.divisor.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_3enp___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_3enp___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":526 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->enp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.enp.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_1s___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_1s___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":530 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.s.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_9one_delta___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_9one_delta___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":534 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->one_delta); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.one_delta.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_9two_delta___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_9two_delta___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":538 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->two_delta); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.two_delta.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs_9trace_hat___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs_9trace_hat___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":542 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_v_self)->_base->trace_hat); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_outputs.trace_hat.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_fitted_values;
+static PyObject *__pyx_n_fitted_residuals;
+static PyObject *__pyx_n_enp;
+static PyObject *__pyx_n_s;
+static PyObject *__pyx_n_one_delta;
+static PyObject *__pyx_n_two_delta;
+static PyObject *__pyx_n_divisor;
+
+static PyObject *__pyx_k83p;
+static PyObject *__pyx_k84p;
+static PyObject *__pyx_k85p;
+static PyObject *__pyx_k86p;
+static PyObject *__pyx_k87p;
+static PyObject *__pyx_k88p;
+static PyObject *__pyx_k89p;
+static PyObject *__pyx_k90p;
+
+static char (__pyx_k83[]) = "Outputs................";
+static char (__pyx_k84[]) = "Fitted values         : %s\n";
+static char (__pyx_k85[]) = "Fitted residuals      : %s\n";
+static char (__pyx_k86[]) = "Eqv. nb of parameters : %s";
+static char (__pyx_k87[]) = "Residual error        : %s";
+static char (__pyx_k88[]) = "Deltas                : %s - %s";
+static char (__pyx_k89[]) = "Normalization factors : %s";
+static char (__pyx_k90[]) = "\n";
+
+static PyObject *__pyx_f_7_mloess_13loess_outputs___str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_13loess_outputs___str__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_v_strg;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  PyObject *__pyx_6 = 0;
+  PyObject *__pyx_7 = 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_strg = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":545 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_fitted_values); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k84p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_fitted_residuals); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; goto __pyx_L1;}
+  __pyx_3 = PyNumber_Remainder(__pyx_k85p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_enp); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Remainder(__pyx_k86p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
+  __pyx_5 = PyNumber_Remainder(__pyx_k87p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_one_delta); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
+  __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_two_delta); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
+  __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_1);
+  PyTuple_SET_ITEM(__pyx_7, 1, __pyx_6);
+  __pyx_1 = 0;
+  __pyx_6 = 0;
+  __pyx_1 = PyNumber_Remainder(__pyx_k88p, __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
+  Py_DECREF(__pyx_7); __pyx_7 = 0;
+  __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_divisor); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;}
+  __pyx_7 = PyNumber_Remainder(__pyx_k89p, __pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_6 = PyList_New(7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; goto __pyx_L1;}
+  Py_INCREF(__pyx_k83p);
+  PyList_SET_ITEM(__pyx_6, 0, __pyx_k83p);
+  PyList_SET_ITEM(__pyx_6, 1, __pyx_2);
+  PyList_SET_ITEM(__pyx_6, 2, __pyx_3);
+  PyList_SET_ITEM(__pyx_6, 3, __pyx_4);
+  PyList_SET_ITEM(__pyx_6, 4, __pyx_5);
+  PyList_SET_ITEM(__pyx_6, 5, __pyx_1);
+  PyList_SET_ITEM(__pyx_6, 6, __pyx_7);
+  __pyx_2 = 0;
+  __pyx_3 = 0;
+  __pyx_4 = 0;
+  __pyx_5 = 0;
+  __pyx_1 = 0;
+  __pyx_7 = 0;
+  Py_DECREF(__pyx_v_strg);
+  __pyx_v_strg = __pyx_6;
+  __pyx_6 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":552 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k90p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_strg);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_strg);
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_r = __pyx_4;
+  __pyx_4 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  Py_XDECREF(__pyx_6);
+  Py_XDECREF(__pyx_7);
+  __Pyx_AddTraceback("_mloess.loess_outputs.__str__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_strg);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static void __pyx_f_7_mloess_14conf_intervals___dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_f_7_mloess_14conf_intervals___dealloc__(PyObject *__pyx_v_self) {
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":574 */
+  pw_free_mem((&((struct __pyx_obj_7_mloess_conf_intervals *)__pyx_v_self)->_base));
+
+  Py_DECREF(__pyx_v_self);
+}
+
+static PyObject *__pyx_f_7_mloess_14conf_intervals_setup(struct __pyx_obj_7_mloess_conf_intervals *__pyx_v_self,conf_inv __pyx_v_base,long __pyx_v_nest) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":577 */
+  __pyx_v_self->_base = __pyx_v_base;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":578 */
+  __pyx_1 = __pyx_f_7_mloess_floatarray_from_data(__pyx_v_nest,1,__pyx_v_base.fit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_self->fit));
+  __pyx_v_self->fit = ((PyArrayObject *)__pyx_1);
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":579 */
+  __pyx_1 = __pyx_f_7_mloess_floatarray_from_data(__pyx_v_nest,1,__pyx_v_base.upper); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_self->upper));
+  __pyx_v_self->upper = ((PyArrayObject *)__pyx_1);
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":580 */
+  __pyx_1 = __pyx_f_7_mloess_floatarray_from_data(__pyx_v_nest,1,__pyx_v_base.lower); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_self->lower));
+  __pyx_v_self->lower = ((PyArrayObject *)__pyx_1);
+  __pyx_1 = 0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.conf_intervals.setup");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_r_;
+static PyObject *__pyx_n_T;
+
+static PyObject *__pyx_k91p;
+
+static char (__pyx_k91[]) = "Confidence intervals....\nLower b./ fit / upper b.\n%s";
+
+static PyObject *__pyx_f_7_mloess_14conf_intervals___str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_14conf_intervals___str__(PyObject *__pyx_v_self) {
+  PyArrayObject *__pyx_v_tmp_ndr;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_tmp_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":584 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_r_); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyList_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_conf_intervals *)__pyx_v_self)->lower));
+  PyList_SET_ITEM(__pyx_1, 0, ((PyObject *)((struct __pyx_obj_7_mloess_conf_intervals *)__pyx_v_self)->lower));
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_conf_intervals *)__pyx_v_self)->fit));
+  PyList_SET_ITEM(__pyx_1, 1, ((PyObject *)((struct __pyx_obj_7_mloess_conf_intervals *)__pyx_v_self)->fit));
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_conf_intervals *)__pyx_v_self)->upper));
+  PyList_SET_ITEM(__pyx_1, 2, ((PyObject *)((struct __pyx_obj_7_mloess_conf_intervals *)__pyx_v_self)->upper));
+  __pyx_3 = PyObject_GetItem(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_T); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_tmp_ndr));
+  __pyx_v_tmp_ndr = ((PyArrayObject *)__pyx_2);
+  __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":585 */
+  __pyx_1 = PyNumber_Remainder(__pyx_k91p, ((PyObject *)__pyx_v_tmp_ndr)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("_mloess.conf_intervals.__str__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_tmp_ndr);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static void __pyx_f_7_mloess_15loess_predicted___dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_f_7_mloess_15loess_predicted___dealloc__(PyObject *__pyx_v_self) {
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":614 */
+  pred_free_mem((&((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->_base));
+
+  Py_DECREF(__pyx_v_self);
+}
+
+static PyObject *__pyx_f_7_mloess_15loess_predicted_setup(struct __pyx_obj_7_mloess_loess_predicted *__pyx_v_self,prediction __pyx_v_base,long __pyx_v_nest) {
+  PyObject *__pyx_r;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":617 */
+  __pyx_v_self->_base = __pyx_v_base;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":618 */
+  __pyx_v_self->nest = __pyx_v_nest;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_15loess_predicted_6values___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_15loess_predicted_6values___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":622 */
+  __pyx_1 = __pyx_f_7_mloess_floatarray_from_data(((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->nest,1,((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->_base.fit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_predicted.values.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_15loess_predicted_6stderr___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_15loess_predicted_6stderr___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":626 */
+  __pyx_1 = __pyx_f_7_mloess_floatarray_from_data(((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->nest,1,((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->_base.se_fit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_predicted.stderr.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_15loess_predicted_14residual_scale___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_15loess_predicted_14residual_scale___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":630 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->_base.residual_scale); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_predicted.residual_scale.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_15loess_predicted_2df___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_15loess_predicted_2df___get__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":634 */
+  __pyx_1 = PyFloat_FromDouble(((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->_base.df); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
+  __pyx_r = __pyx_1;
+  __pyx_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  __Pyx_AddTraceback("_mloess.loess_predicted.df.__get__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k92p;
+
+static char (__pyx_k92[]) = "The coverage precentage should be between 0 and 1!";
+
+static PyObject *__pyx_f_7_mloess_15loess_predicted_confidence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7_mloess_15loess_predicted_confidence[] = "Returns the pointwise confidence intervals for each predicted values,\nat the given confidence interval coverage.\n        \n:Parameters:\n    coverage : float\n        Confidence level of the confidence intervals limits, as a fraction.\n        \n:Returns:\n    A new conf_intervals object, consisting of:\n    fit : ndarray\n        Predicted values.\n    lower : ndarray\n        Lower bounds of the confidence intervals.\n    upper : ndarray\n        Upper bounds of the confidence intervals.\n        ";
+static PyObject *__pyx_f_7_mloess_15loess_predicted_confidence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_coverage = 0;
+  conf_inv __pyx_v__confintv;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  double __pyx_5;
+  static char *__pyx_argnames[] = {"coverage",0};
+  __pyx_v_coverage = __pyx_k10;
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_coverage)) return 0;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_coverage);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":654 */
+  __pyx_1 = PyFloat_FromDouble(0.5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_coverage, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;}
+  __pyx_2 = __pyx_2 < 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_2) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":655 */
+    __pyx_1 = PyFloat_FromDouble(1.); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; goto __pyx_L1;}
+    __pyx_3 = PyNumber_Subtract(__pyx_1, __pyx_v_coverage); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_v_coverage);
+    __pyx_v_coverage = __pyx_3;
+    __pyx_3 = 0;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":656 */
+  __pyx_1 = PyFloat_FromDouble(1.); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_v_coverage, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; goto __pyx_L1;}
+  __pyx_2 = __pyx_2 > 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_2) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":657 */
+    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; goto __pyx_L1;}
+    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; goto __pyx_L1;}
+    Py_INCREF(__pyx_k92p);
+    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k92p);
+    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; goto __pyx_L1;}
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":658 */
+  __pyx_5 = PyFloat_AsDouble(__pyx_v_coverage); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; goto __pyx_L1;}
+  pointwise((&((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->_base),((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->nest,__pyx_5,(&__pyx_v__confintv));
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":659 */
+  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_7_mloess_conf_intervals), 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_7_mloess_conf_intervals)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->confidence_intervals));
+  ((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->confidence_intervals = ((struct __pyx_obj_7_mloess_conf_intervals *)__pyx_3);
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":660 */
+  __pyx_1 = ((struct __pyx_vtabstruct_7_mloess_conf_intervals *)((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->confidence_intervals->__pyx_vtab)->setup(((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->confidence_intervals,__pyx_v__confintv,((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->nest); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":661 */
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->confidence_intervals));
+  __pyx_r = ((PyObject *)((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_v_self)->confidence_intervals);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess_predicted.confidence");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_coverage);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_values;
+static PyObject *__pyx_n_stderr;
+static PyObject *__pyx_n_residual_scale;
+static PyObject *__pyx_n_df;
+
+static PyObject *__pyx_k93p;
+static PyObject *__pyx_k94p;
+static PyObject *__pyx_k95p;
+static PyObject *__pyx_k96p;
+static PyObject *__pyx_k97p;
+static PyObject *__pyx_k98p;
+
+static char (__pyx_k93[]) = "Outputs................";
+static char (__pyx_k94[]) = "Predicted values      : %s\n";
+static char (__pyx_k95[]) = "Predicted std error   : %s\n";
+static char (__pyx_k96[]) = "Residual scale        : %s";
+static char (__pyx_k97[]) = "Degrees of freedom    : %s";
+static char (__pyx_k98[]) = "\n";
+
+static PyObject *__pyx_f_7_mloess_15loess_predicted___str__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_f_7_mloess_15loess_predicted___str__(PyObject *__pyx_v_self) {
+  PyObject *__pyx_v_strg;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_strg = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":664 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_values); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k94p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_stderr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;}
+  __pyx_3 = PyNumber_Remainder(__pyx_k95p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_residual_scale); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
+  __pyx_4 = PyNumber_Remainder(__pyx_k96p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_df); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; goto __pyx_L1;}
+  __pyx_5 = PyNumber_Remainder(__pyx_k97p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyList_New(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; goto __pyx_L1;}
+  Py_INCREF(__pyx_k93p);
+  PyList_SET_ITEM(__pyx_1, 0, __pyx_k93p);
+  PyList_SET_ITEM(__pyx_1, 1, __pyx_2);
+  PyList_SET_ITEM(__pyx_1, 2, __pyx_3);
+  PyList_SET_ITEM(__pyx_1, 3, __pyx_4);
+  PyList_SET_ITEM(__pyx_1, 4, __pyx_5);
+  __pyx_2 = 0;
+  __pyx_3 = 0;
+  __pyx_4 = 0;
+  __pyx_5 = 0;
+  Py_DECREF(__pyx_v_strg);
+  __pyx_v_strg = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":671 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k98p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_strg);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_strg);
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_r = __pyx_4;
+  __pyx_4 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  __Pyx_AddTraceback("_mloess.loess_predicted.__str__");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_strg);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_iteritems;
+static PyObject *__pyx_n_update;
+
+
+static int __pyx_f_7_mloess_5loess___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_f_7_mloess_5loess___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_x = 0;
+  PyObject *__pyx_v_y = 0;
+  PyObject *__pyx_v_weights = 0;
+  PyObject *__pyx_v_options = 0;
+  double (*__pyx_v_x_dat);
+  double (*__pyx_v_y_dat);
+  PyObject *__pyx_v_n;
+  PyObject *__pyx_v_p;
+  PyObject *__pyx_v_modelopt;
+  PyObject *__pyx_v_controlopt;
+  PyObject *__pyx_v_k;
+  PyObject *__pyx_v_v;
+  int __pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  long __pyx_3;
+  long __pyx_4;
+  PyObject *__pyx_5 = 0;
+  int __pyx_6;
+  static char *__pyx_argnames[] = {"x","y","weights",0};
+  __pyx_v_weights = __pyx_k11;
+  if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 3, 0, &__pyx_v_options) < 0) return -1;
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_x, &__pyx_v_y, &__pyx_v_weights)) {
+    Py_XDECREF(__pyx_args);
+    Py_XDECREF(__pyx_kwds);
+    Py_XDECREF(__pyx_v_options);
+    return -1;
+  }
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_x);
+  Py_INCREF(__pyx_v_y);
+  Py_INCREF(__pyx_v_weights);
+  __pyx_v_n = Py_None; Py_INCREF(Py_None);
+  __pyx_v_p = Py_None; Py_INCREF(Py_None);
+  __pyx_v_modelopt = Py_None; Py_INCREF(Py_None);
+  __pyx_v_controlopt = Py_None; Py_INCREF(Py_None);
+  __pyx_v_k = Py_None; Py_INCREF(Py_None);
+  __pyx_v_v = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":792 */
+  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_x);
+  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_x);
+  Py_INCREF(__pyx_v_y);
+  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_y);
+  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_7_mloess_loess_inputs), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7_mloess_loess_inputs)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs));
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs = ((struct __pyx_obj_7_mloess_loess_inputs *)__pyx_2);
+  __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":793 */
+  __pyx_v_x_dat = ((double (*))((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs->x_eff->data);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":794 */
+  __pyx_v_y_dat = ((double (*))((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs->y_eff->data);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":795 */
+  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs->nobs_eff); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_n);
+  __pyx_v_n = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":796 */
+  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs->npar); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_p);
+  __pyx_v_p = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":797 */
+  __pyx_3 = PyInt_AsLong(__pyx_v_n); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
+  __pyx_4 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
+  loess_setup(__pyx_v_x_dat,__pyx_v_y_dat,__pyx_3,__pyx_4,(&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base));
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":799 */
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs->_base = (&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.inputs);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":801 */
+  __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_7_mloess_loess_model), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7_mloess_loess_model)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->model));
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->model = ((struct __pyx_obj_7_mloess_loess_model *)__pyx_1);
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":802 */
+  __pyx_3 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
+  __pyx_2 = ((struct __pyx_vtabstruct_7_mloess_loess_model *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->model->__pyx_vtab)->setup(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->model,(&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.model),__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":804 */
+  __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_7_mloess_loess_control), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7_mloess_loess_control)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->control));
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->control = ((struct __pyx_obj_7_mloess_loess_control *)__pyx_1);
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":805 */
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->control->_base = (&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.control);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":807 */
+  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_7_mloess_loess_kd_tree), 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7_mloess_loess_kd_tree)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->kd_tree));
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->kd_tree = ((struct __pyx_obj_7_mloess_loess_kd_tree *)__pyx_2);
+  __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":808 */
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->kd_tree->_base = (&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.kd_tree);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":810 */
+  __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_7_mloess_loess_outputs), 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_1, __pyx_ptype_7_mloess_loess_outputs)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs));
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs = ((struct __pyx_obj_7_mloess_loess_outputs *)__pyx_1);
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":811 */
+  __pyx_4 = PyInt_AsLong(__pyx_v_n); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;}
+  __pyx_3 = PyInt_AsLong(__pyx_v_p); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;}
+  __pyx_2 = ((struct __pyx_vtabstruct_7_mloess_loess_outputs *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs->__pyx_vtab)->setup(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs,(&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.outputs),((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs->nobs,__pyx_4,__pyx_3,((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs->masked); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":814 */
+  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_modelopt);
+  __pyx_v_modelopt = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":815 */
+  __pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_controlopt);
+  __pyx_v_controlopt = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":816 */
+  __pyx_1 = PyObject_GetAttr(__pyx_v_options, __pyx_n_iteritems); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  __pyx_1 = PyObject_GetIter(__pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  for (;;) {
+    __pyx_2 = PyIter_Next(__pyx_1);
+    if (!__pyx_2) {
+      if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+      break;
+    }
+    __pyx_5 = PyObject_GetIter(__pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    __pyx_2 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+    Py_DECREF(__pyx_v_k);
+    __pyx_v_k = __pyx_2;
+    __pyx_2 = 0;
+    __pyx_2 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+    Py_DECREF(__pyx_v_v);
+    __pyx_v_v = __pyx_2;
+    __pyx_2 = 0;
+    if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;}
+    Py_DECREF(__pyx_5); __pyx_5 = 0;
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":817 */
+    __pyx_2 = PyTuple_New(6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
+    Py_INCREF(__pyx_n_family);
+    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_family);
+    Py_INCREF(__pyx_n_span);
+    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_n_span);
+    Py_INCREF(__pyx_n_degree);
+    PyTuple_SET_ITEM(__pyx_2, 2, __pyx_n_degree);
+    Py_INCREF(__pyx_n_normalize);
+    PyTuple_SET_ITEM(__pyx_2, 3, __pyx_n_normalize);
+    Py_INCREF(__pyx_n_parametric);
+    PyTuple_SET_ITEM(__pyx_2, 4, __pyx_n_parametric);
+    Py_INCREF(__pyx_n_drop_square);
+    PyTuple_SET_ITEM(__pyx_2, 5, __pyx_n_drop_square);
+    __pyx_6 = PySequence_Contains(__pyx_2, __pyx_v_k); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    if (__pyx_6) {
+
+      /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":819 */
+      if (PyObject_SetItem(__pyx_v_modelopt, __pyx_v_k, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; goto __pyx_L1;}
+      goto __pyx_L4;
+    }
+    __pyx_5 = PyTuple_New(5); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; goto __pyx_L1;}
+    Py_INCREF(__pyx_n_surface);
+    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_n_surface);
+    Py_INCREF(__pyx_n_statistics);
+    PyTuple_SET_ITEM(__pyx_5, 1, __pyx_n_statistics);
+    Py_INCREF(__pyx_n_trace_hat);
+    PyTuple_SET_ITEM(__pyx_5, 2, __pyx_n_trace_hat);
+    Py_INCREF(__pyx_n_iterations);
+    PyTuple_SET_ITEM(__pyx_5, 3, __pyx_n_iterations);
+    Py_INCREF(__pyx_n_cell);
+    PyTuple_SET_ITEM(__pyx_5, 4, __pyx_n_cell);
+    __pyx_6 = PySequence_Contains(__pyx_5, __pyx_v_k); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; goto __pyx_L1;}
+    Py_DECREF(__pyx_5); __pyx_5 = 0;
+    if (__pyx_6) {
+
+      /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":822 */
+      if (PyObject_SetItem(__pyx_v_controlopt, __pyx_v_k, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; goto __pyx_L1;}
+      goto __pyx_L4;
+    }
+    __pyx_L4:;
+  }
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":823 */
+  __pyx_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->control), __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
+  __pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
+  __pyx_1 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_5, __pyx_v_controlopt); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":824 */
+  __pyx_2 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->model), __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;}
+  __pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;}
+  __pyx_1 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_5, __pyx_v_modelopt); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_5);
+  __Pyx_AddTraceback("_mloess.loess.__init__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_XDECREF(__pyx_v_options);
+  Py_DECREF(__pyx_v_n);
+  Py_DECREF(__pyx_v_p);
+  Py_DECREF(__pyx_v_modelopt);
+  Py_DECREF(__pyx_v_controlopt);
+  Py_DECREF(__pyx_v_k);
+  Py_DECREF(__pyx_v_v);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_x);
+  Py_DECREF(__pyx_v_y);
+  Py_DECREF(__pyx_v_weights);
+  Py_XDECREF(__pyx_args);
+  Py_XDECREF(__pyx_kwds);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_f_7_mloess_5loess_fit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7_mloess_5loess_fit[] = "Computes the loess parameters on the current inputs and sets of parameters.";
+static PyObject *__pyx_f_7_mloess_5loess_fit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  int __pyx_2;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  static char *__pyx_argnames[] = {0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":828 */
+  loess_fit((&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base));
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":829 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;}
+  __pyx_2 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs->activated = __pyx_2;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":830 */
+  __pyx_2 = ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.status.err_status;
+  if (__pyx_2) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":831 */
+    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
+    __pyx_3 = PyString_FromString(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.status.err_msg); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
+    __pyx_3 = 0;
+    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __Pyx_Raise(__pyx_3, 0, 0);
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":832 */
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  __Pyx_AddTraceback("_mloess.loess.fit");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_str;
+
+static PyObject *__pyx_k110p;
+
+static char (__pyx_k110[]) = "\n";
+
+static PyObject *__pyx_f_7_mloess_5loess_inputs_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7_mloess_5loess_inputs_summary[] = "Returns some generic information about the loess parameters.\n        ";
+static PyObject *__pyx_f_7_mloess_5loess_inputs_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_toprint;
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  static char *__pyx_argnames[] = {0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
+  Py_INCREF(__pyx_v_self);
+  __pyx_v_toprint = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":837 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs));
+  PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs));
+  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->model));
+  PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->model));
+  __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->control));
+  PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->control));
+  __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_1 = PyList_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; goto __pyx_L1;}
+  PyList_SET_ITEM(__pyx_1, 0, __pyx_3);
+  PyList_SET_ITEM(__pyx_1, 1, __pyx_4);
+  PyList_SET_ITEM(__pyx_1, 2, __pyx_5);
+  __pyx_3 = 0;
+  __pyx_4 = 0;
+  __pyx_5 = 0;
+  Py_DECREF(__pyx_v_toprint);
+  __pyx_v_toprint = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":838 */
+  __pyx_2 = PyObject_GetAttr(__pyx_k110p, __pyx_n_join); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_toprint);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_toprint);
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_r = __pyx_4;
+  __pyx_4 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  __Pyx_AddTraceback("_mloess.loess.inputs_summary");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_toprint);
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_k111p;
+static PyObject *__pyx_k112p;
+static PyObject *__pyx_k113p;
+static PyObject *__pyx_k115p;
+static PyObject *__pyx_k116p;
+
+static char (__pyx_k111[]) = "Number of Observations         : %d";
+static char (__pyx_k112[]) = "Fit flag                       : %d";
+static char (__pyx_k113[]) = "Equivalent Number of Parameters: %.1f";
+static char (__pyx_k115[]) = "Residual Standard Error        : %.4f";
+static char (__pyx_k116[]) = "Residual Scale Estimate        : %.4f";
+
+static PyObject *__pyx_f_7_mloess_5loess_outputs_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7_mloess_5loess_outputs_summary[] = "Returns some generic information about the loess fit.";
+static PyObject *__pyx_f_7_mloess_5loess_outputs_summary(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_r;
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  int __pyx_4;
+  static char *__pyx_argnames[] = {0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":842 */
+  __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs->nobs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k111p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; goto __pyx_L1;}
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":843 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bool); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
+  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs->activated); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_1 = PyNumber_Remainder(__pyx_k112p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (__Pyx_PrintItem(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":844 */
+  __pyx_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs), __pyx_n_enp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Remainder(__pyx_k113p, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; goto __pyx_L1;}
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":845 */
+  __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->model), __pyx_n_family); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_1, __pyx_n_gaussian, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; goto __pyx_L1;}
+  __pyx_4 = __pyx_4 == 0;
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (__pyx_4) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":846 */
+    __pyx_3 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs), __pyx_n_s); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;}
+    __pyx_2 = PyNumber_Remainder(__pyx_k115p, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  /*else*/ {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":848 */
+    __pyx_1 = PyObject_GetAttr(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs), __pyx_n_s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
+    __pyx_3 = PyNumber_Remainder(__pyx_k116p, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
+    Py_DECREF(__pyx_1); __pyx_1 = 0;
+    if (__Pyx_PrintItem(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
+  }
+  __pyx_L2:;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  __Pyx_AddTraceback("_mloess.loess.outputs_summary");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_self);
+  return __pyx_r;
+}
+
+static PyObject *__pyx_n_divmod;
+
+static PyObject *__pyx_k121p;
+static PyObject *__pyx_k122p;
+
+static char (__pyx_k121[]) = "Can't predict without input data !";
+static char (__pyx_k122[]) = "Incompatible data size: there should be as many rows as parameters";
+
+static PyObject *__pyx_f_7_mloess_5loess_predict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_7_mloess_5loess_predict[] = "Computes loess estimates at the given new data points newdata. Returns\na loess_predicted object, whose attributes are described below.\n        \n:Parameters:\n    newdata : ndarray\n        The (m,p) array of independent variables where the surface must be estimated,\n        with m the number of new data points, and p the number of independent\n        variables.\n    stderror : boolean\n        Whether the standard error should be computed\n        \n:Returns:\n    A new loess_predicted object, consisting of:\n    values : ndarray\n        The (m,) ndarray of loess values evaluated at newdata\n    stderr : ndarray\n        The (m,) ndarray of the estimates of the standard error on the estimated\n        values.\n    residual_scale : float\n        Estimate of the scale of the residuals\n    df : integer\n        Degrees of freedom of the t-distribution used to compute pointwise \n        confidence intervals for the evaluated surface.\n    nest : integer\n        Number of new observations.\n        ";
+static PyObject *__pyx_f_7_mloess_5loess_predict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_newdata = 0;
+  PyObject *__pyx_v_stderror = 0;
+  PyArrayObject *__pyx_v_p_ndr;
+  double (*__pyx_v_p_dat);
+  prediction __pyx_v__prediction;
+  int __pyx_v_m;
+  PyObject *__pyx_v_notOK;
+  PyObject *__pyx_r;
+  int __pyx_1;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  PyObject *__pyx_5 = 0;
+  static char *__pyx_argnames[] = {"newdata","stderror",0};
+  __pyx_v_stderror = __pyx_k12;
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_newdata, &__pyx_v_stderror)) return 0;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_newdata);
+  Py_INCREF(__pyx_v_stderror);
+  __pyx_v_p_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  __pyx_v_notOK = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":882 */
+  __pyx_1 = (((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs->activated == 0);
+  if (__pyx_1) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":883 */
+    loess_fit((&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base));
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":884 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;}
+    __pyx_1 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->outputs->activated = __pyx_1;
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":885 */
+    __pyx_1 = ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.status.err_status;
+    if (__pyx_1) {
+
+      /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":886 */
+      __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
+      __pyx_3 = PyString_FromString(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.status.err_msg); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
+      __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
+      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
+      __pyx_3 = 0;
+      __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
+      Py_DECREF(__pyx_2); __pyx_2 = 0;
+      Py_DECREF(__pyx_4); __pyx_4 = 0;
+      __Pyx_Raise(__pyx_3, 0, 0);
+      Py_DECREF(__pyx_3); __pyx_3 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
+      goto __pyx_L3;
+    }
+    __pyx_L3:;
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":888 */
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_narray); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_newdata);
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_newdata);
+  __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_copy, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  if (PyDict_SetItem(__pyx_3, __pyx_n_subok, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  if (PyDict_SetItem(__pyx_3, __pyx_n_order, __pyx_n_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_4, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_2 = PyObject_GetAttr(__pyx_5, __pyx_n_ravel); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  __pyx_4 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (!__Pyx_TypeTest(__pyx_4, __pyx_ptype_7c_numpy_ndarray)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)__pyx_v_p_ndr));
+  __pyx_v_p_ndr = ((PyArrayObject *)__pyx_4);
+  __pyx_4 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":889 */
+  __pyx_v_p_dat = ((double (*))__pyx_v_p_ndr->data);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":891 */
+  __pyx_3 = PyObject_GetAttr(((PyObject *)__pyx_v_p_ndr), __pyx_n_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; goto __pyx_L1;}
+  __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_3, __pyx_5, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; goto __pyx_L1;}
+  __pyx_1 = __pyx_1 == 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  if (__pyx_1) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":892 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; goto __pyx_L1;}
+    Py_INCREF(__pyx_k121p);
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k121p);
+    __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __Pyx_Raise(__pyx_3, 0, 0);
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; goto __pyx_L1;}
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":893 */
+  __pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_divmod); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  Py_INCREF(((PyObject *)__pyx_v_p_ndr));
+  PyTuple_SET_ITEM(__pyx_4, 0, ((PyObject *)__pyx_v_p_ndr));
+  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_2 = PyInt_FromLong(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->inputs->npar); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
+  PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
+  __pyx_3 = 0;
+  __pyx_2 = 0;
+  __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_2 = PyObject_GetIter(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_5 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  __pyx_1 = PyInt_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  Py_DECREF(__pyx_5); __pyx_5 = 0;
+  __pyx_v_m = __pyx_1;
+  __pyx_4 = __Pyx_UnpackItem(__pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_notOK);
+  __pyx_v_notOK = __pyx_4;
+  __pyx_4 = 0;
+  if (__Pyx_EndUnpack(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":894 */
+  __pyx_1 = PyObject_IsTrue(__pyx_v_notOK); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
+  if (__pyx_1) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":895 */
+    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
+    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
+    Py_INCREF(__pyx_k122p);
+    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k122p);
+    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_5); __pyx_5 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;}
+    goto __pyx_L5;
+  }
+  __pyx_L5:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":898 */
+  __pyx_1 = PyInt_AsLong(__pyx_v_stderror); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
+  predict(__pyx_v_p_dat,__pyx_v_m,(&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base),(&__pyx_v__prediction),__pyx_1);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":899 */
+  __pyx_1 = ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.status.err_status;
+  if (__pyx_1) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":900 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
+    __pyx_3 = PyString_FromString(((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base.status.err_msg); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
+    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
+    __pyx_3 = 0;
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_5); __pyx_5 = 0;
+    __Pyx_Raise(__pyx_4, 0, 0);
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
+    goto __pyx_L6;
+  }
+  __pyx_L6:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":901 */
+  __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_7_mloess_loess_predicted), 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; goto __pyx_L1;}
+  if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_7_mloess_loess_predicted)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; goto __pyx_L1;}
+  Py_DECREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->predicted));
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->predicted = ((struct __pyx_obj_7_mloess_loess_predicted *)__pyx_3);
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":902 */
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->predicted->_base = __pyx_v__prediction;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":903 */
+  ((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->predicted->nest = __pyx_v_m;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":905 */
+  Py_INCREF(((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->predicted));
+  __pyx_r = ((PyObject *)((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->predicted);
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; Py_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_5);
+  __Pyx_AddTraceback("_mloess.loess.predict");
+  __pyx_r = 0;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_p_ndr);
+  Py_DECREF(__pyx_v_notOK);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_newdata);
+  Py_DECREF(__pyx_v_stderror);
+  return __pyx_r;
+}
+
+static void __pyx_f_7_mloess_5loess___dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_f_7_mloess_5loess___dealloc__(PyObject *__pyx_v_self) {
+  Py_INCREF(__pyx_v_self);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":908 */
+  loess_free_mem((&((struct __pyx_obj_7_mloess_loess *)__pyx_v_self)->_base));
+
+  Py_DECREF(__pyx_v_self);
+}
+
+static PyObject *__pyx_n_isinstance;
+static PyObject *__pyx_n_type;
+static PyObject *__pyx_n_outputs;
+static PyObject *__pyx_n_abs;
+
+static PyObject *__pyx_k123p;
+
+static char (__pyx_k123[]) = "Arguments should be valid loess objects!got '%s' instead";
+
+static int __pyx_f_7_mloess_5anova___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_f_7_mloess_5anova___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_loess_one = 0;
+  PyObject *__pyx_v_loess_two = 0;
+  double __pyx_v_one_d1;
+  double __pyx_v_one_d2;
+  double __pyx_v_one_s;
+  double __pyx_v_two_d1;
+  double __pyx_v_two_d2;
+  double __pyx_v_two_s;
+  double __pyx_v_rssdiff;
+  double __pyx_v_d1diff;
+  double __pyx_v_tmp;
+  double __pyx_v_df1;
+  double __pyx_v_df2;
+  PyObject *__pyx_v_out_one;
+  PyObject *__pyx_v_out_two;
+  PyObject *__pyx_v_F_value;
+  int __pyx_r;
+  int __pyx_1;
+  PyObject *__pyx_2 = 0;
+  PyObject *__pyx_3 = 0;
+  PyObject *__pyx_4 = 0;
+  int __pyx_5;
+  PyObject *__pyx_6 = 0;
+  double __pyx_7;
+  static char *__pyx_argnames[] = {"loess_one","loess_two",0};
+  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_loess_one, &__pyx_v_loess_two)) return -1;
+  Py_INCREF(__pyx_v_self);
+  Py_INCREF(__pyx_v_loess_one);
+  Py_INCREF(__pyx_v_loess_two);
+  __pyx_v_out_one = Py_None; Py_INCREF(Py_None);
+  __pyx_v_out_two = Py_None; Py_INCREF(Py_None);
+  __pyx_v_F_value = Py_None; Py_INCREF(Py_None);
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":922 */
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+  Py_INCREF(__pyx_v_loess_one);
+  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_loess_one);
+  Py_INCREF(((PyObject*)__pyx_ptype_7_mloess_loess));
+  PyTuple_SET_ITEM(__pyx_3, 1, ((PyObject*)__pyx_ptype_7_mloess_loess));
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_1 = (!__pyx_5);
+  if (!__pyx_1) {
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_loess_two);
+    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_loess_two);
+    Py_INCREF(((PyObject*)__pyx_ptype_7_mloess_loess));
+    PyTuple_SET_ITEM(__pyx_3, 1, ((PyObject*)__pyx_ptype_7_mloess_loess));
+    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    __pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;}
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __pyx_1 = (!__pyx_5);
+  }
+  if (__pyx_1) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":923 */
+    __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;}
+    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; goto __pyx_L1;}
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; goto __pyx_L1;}
+    Py_INCREF(__pyx_v_loess_one);
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_loess_one);
+    __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; goto __pyx_L1;}
+    Py_DECREF(__pyx_3); __pyx_3 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __pyx_3 = PyNumber_Remainder(__pyx_k123p, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; goto __pyx_L1;}
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;}
+    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
+    __pyx_3 = 0;
+    __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;}
+    Py_DECREF(__pyx_2); __pyx_2 = 0;
+    Py_DECREF(__pyx_4); __pyx_4 = 0;
+    __Pyx_Raise(__pyx_6, 0, 0);
+    Py_DECREF(__pyx_6); __pyx_6 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; goto __pyx_L1;}
+    goto __pyx_L2;
+  }
+  __pyx_L2:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":926 */
+  __pyx_3 = PyObject_GetAttr(__pyx_v_loess_one, __pyx_n_outputs); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_out_one);
+  __pyx_v_out_one = __pyx_3;
+  __pyx_3 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":927 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_loess_two, __pyx_n_outputs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_out_two);
+  __pyx_v_out_two = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":929 */
+  __pyx_4 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_one_delta); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_v_one_d1 = __pyx_7;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":930 */
+  __pyx_6 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_two_delta); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_v_one_d2 = __pyx_7;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":931 */
+  __pyx_3 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_s); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  __pyx_v_one_s = __pyx_7;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":933 */
+  __pyx_2 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_one_delta); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_v_two_d1 = __pyx_7;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":934 */
+  __pyx_4 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_two_delta); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_v_two_d2 = __pyx_7;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":935 */
+  __pyx_6 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_s); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; goto __pyx_L1;}
+  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_v_two_s = __pyx_7;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":937 */
+  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; goto __pyx_L1;}
+  __pyx_2 = PyFloat_FromDouble((((__pyx_v_one_s * __pyx_v_one_s) * __pyx_v_one_d1) - ((__pyx_v_two_s * __pyx_v_two_s) * __pyx_v_two_d1))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
+  __pyx_2 = 0;
+  __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_v_rssdiff = __pyx_7;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":938 */
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;}
+  __pyx_3 = PyFloat_FromDouble((__pyx_v_one_d1 - __pyx_v_two_d1)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;}
+  __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
+  __pyx_3 = 0;
+  __pyx_6 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_7 = PyFloat_AsDouble(__pyx_6); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_v_d1diff = __pyx_7;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":939 */
+  __pyx_3 = PyFloat_FromDouble((__pyx_v_d1diff * __pyx_v_d1diff)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
+  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
+  __pyx_4 = PyFloat_FromDouble((__pyx_v_one_d2 - __pyx_v_two_d2)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
+  __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
+  PyTuple_SET_ITEM(__pyx_6, 0, __pyx_4);
+  __pyx_4 = 0;
+  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  __pyx_2 = PyNumber_Divide(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_7 = PyFloat_AsDouble(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  ((struct __pyx_obj_7_mloess_anova *)__pyx_v_self)->dfn = __pyx_7;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":940 */
+  __pyx_v_df1 = ((struct __pyx_obj_7_mloess_anova *)__pyx_v_self)->dfn;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":942 */
+  __pyx_6 = PyObject_GetAttr(__pyx_v_out_one, __pyx_n_enp); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; goto __pyx_L1;}
+  __pyx_3 = PyObject_GetAttr(__pyx_v_out_two, __pyx_n_enp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; goto __pyx_L1;}
+  if (PyObject_Cmp(__pyx_6, __pyx_3, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; goto __pyx_L1;}
+  __pyx_5 = __pyx_5 > 0;
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  if (__pyx_5) {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":943 */
+    ((struct __pyx_obj_7_mloess_anova *)__pyx_v_self)->dfd = ((__pyx_v_one_d1 * __pyx_v_one_d1) / __pyx_v_one_d2);
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":944 */
+    __pyx_v_tmp = __pyx_v_one_s;
+    goto __pyx_L3;
+  }
+  /*else*/ {
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":946 */
+    ((struct __pyx_obj_7_mloess_anova *)__pyx_v_self)->dfd = ((__pyx_v_two_d1 * __pyx_v_two_d1) / __pyx_v_two_d2);
+
+    /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":947 */
+    __pyx_v_tmp = __pyx_v_two_s;
+  }
+  __pyx_L3:;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":948 */
+  __pyx_v_df2 = ((struct __pyx_obj_7_mloess_anova *)__pyx_v_self)->dfd;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":949 */
+  __pyx_4 = PyFloat_FromDouble(((__pyx_v_rssdiff / __pyx_v_d1diff) / (__pyx_v_tmp * __pyx_v_tmp))); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; goto __pyx_L1;}
+  Py_DECREF(__pyx_v_F_value);
+  __pyx_v_F_value = __pyx_4;
+  __pyx_4 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":951 */
+  __pyx_2 = PyFloat_FromDouble(__pyx_v_df1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
+  __pyx_6 = PyNumber_Multiply(__pyx_v_F_value, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_3 = PyFloat_FromDouble(__pyx_v_df2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
+  __pyx_4 = PyFloat_FromDouble(__pyx_v_df1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
+  __pyx_2 = PyNumber_Multiply(__pyx_v_F_value, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_4 = PyNumber_Add(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_3 = PyNumber_Divide(__pyx_6, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
+  Py_DECREF(__pyx_6); __pyx_6 = 0;
+  Py_DECREF(__pyx_4); __pyx_4 = 0;
+  __pyx_7 = PyFloat_AsDouble(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
+  Py_DECREF(__pyx_3); __pyx_3 = 0;
+  ((struct __pyx_obj_7_mloess_anova *)__pyx_v_self)->Pr_F = (1. - ibeta(__pyx_7,(__pyx_v_df1 / 2),(__pyx_v_df2 / 2)));
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":952 */
+  __pyx_7 = PyFloat_AsDouble(__pyx_v_F_value); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; goto __pyx_L1;}
+  ((struct __pyx_obj_7_mloess_anova *)__pyx_v_self)->F_value = __pyx_7;
+
+  __pyx_r = 0;
+  goto __pyx_L0;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_2);
+  Py_XDECREF(__pyx_3);
+  Py_XDECREF(__pyx_4);
+  Py_XDECREF(__pyx_6);
+  __Pyx_AddTraceback("_mloess.anova.__init__");
+  __pyx_r = -1;
+  __pyx_L0:;
+  Py_DECREF(__pyx_v_out_one);
+  Py_DECREF(__pyx_v_out_two);
+  Py_DECREF(__pyx_v_F_value);
+  Py_DECREF(__pyx_v_self);
+  Py_DECREF(__pyx_v_loess_one);
+  Py_DECREF(__pyx_v_loess_two);
+  return __pyx_r;
+}
+
+static __Pyx_InternTabEntry __pyx_intern_tab[] = {
+  {&__pyx_n_C, "C"},
+  {&__pyx_n_False, "False"},
+  {&__pyx_n_T, "T"},
+  {&__pyx_n_True, "True"},
+  {&__pyx_n_ValueError, "ValueError"},
+  {&__pyx_n_abs, "abs"},
+  {&__pyx_n_any, "any"},
+  {&__pyx_n_approximate, "approximate"},
+  {&__pyx_n_array, "array"},
+  {&__pyx_n_astype, "astype"},
+  {&__pyx_n_atleast_1d, "atleast_1d"},
+  {&__pyx_n_axis, "axis"},
+  {&__pyx_n_bool, "bool"},
+  {&__pyx_n_c_loess, "c_loess"},
+  {&__pyx_n_c_numpy, "c_numpy"},
+  {&__pyx_n_c_python, "c_python"},
+  {&__pyx_n_cell, "cell"},
+  {&__pyx_n_copy, "copy"},
+  {&__pyx_n_data, "data"},
+  {&__pyx_n_degree, "degree"},
+  {&__pyx_n_df, "df"},
+  {&__pyx_n_direct, "direct"},
+  {&__pyx_n_divisor, "divisor"},
+  {&__pyx_n_divmod, "divmod"},
+  {&__pyx_n_drop_square, "drop_square"},
+  {&__pyx_n_drop_square_flags, "drop_square_flags"},
+  {&__pyx_n_dtype, "dtype"},
+  {&__pyx_n_empty, "empty"},
+  {&__pyx_n_enp, "enp"},
+  {&__pyx_n_exact, "exact"},
+  {&__pyx_n_family, "family"},
+  {&__pyx_n_fitted_residuals, "fitted_residuals"},
+  {&__pyx_n_fitted_values, "fitted_values"},
+  {&__pyx_n_flat, "flat"},
+  {&__pyx_n_float_, "float_"},
+  {&__pyx_n_gaussian, "gaussian"},
+  {&__pyx_n_get, "get"},
+  {&__pyx_n_getmaskarray, "getmaskarray"},
+  {&__pyx_n_interpolate, "interpolate"},
+  {&__pyx_n_isinstance, "isinstance"},
+  {&__pyx_n_iterations, "iterations"},
+  {&__pyx_n_iteritems, "iteritems"},
+  {&__pyx_n_join, "join"},
+  {&__pyx_n_len, "len"},
+  {&__pyx_n_logical_not, "logical_not"},
+  {&__pyx_n_lower, "lower"},
+  {&__pyx_n_marray, "marray"},
+  {&__pyx_n_mask, "mask"},
+  {&__pyx_n_mask_or, "mask_or"},
+  {&__pyx_n_masked_array, "masked_array"},
+  {&__pyx_n_maskedarray, "maskedarray"},
+  {&__pyx_n_min, "min"},
+  {&__pyx_n_narray, "narray"},
+  {&__pyx_n_ndim, "ndim"},
+  {&__pyx_n_normalize, "normalize"},
+  {&__pyx_n_numpy, "numpy"},
+  {&__pyx_n_one_delta, "one_delta"},
+  {&__pyx_n_ones, "ones"},
+  {&__pyx_n_order, "order"},
+  {&__pyx_n_outputs, "outputs"},
+  {&__pyx_n_parametric, "parametric"},
+  {&__pyx_n_parametric_flags, "parametric_flags"},
+  {&__pyx_n_r_, "r_"},
+  {&__pyx_n_ravel, "ravel"},
+  {&__pyx_n_residual_scale, "residual_scale"},
+  {&__pyx_n_s, "s"},
+  {&__pyx_n_shape, "shape"},
+  {&__pyx_n_size, "size"},
+  {&__pyx_n_small_mask, "small_mask"},
+  {&__pyx_n_span, "span"},
+  {&__pyx_n_statistics, "statistics"},
+  {&__pyx_n_stderr, "stderr"},
+  {&__pyx_n_str, "str"},
+  {&__pyx_n_subok, "subok"},
+  {&__pyx_n_sum, "sum"},
+  {&__pyx_n_surface, "surface"},
+  {&__pyx_n_symmetric, "symmetric"},
+  {&__pyx_n_trace_hat, "trace_hat"},
+  {&__pyx_n_two_delta, "two_delta"},
+  {&__pyx_n_type, "type"},
+  {&__pyx_n_update, "update"},
+  {&__pyx_n_values, "values"},
+  {0, 0}
+};
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+  {&__pyx_k26p, __pyx_k26, sizeof(__pyx_k26)},
+  {&__pyx_k31p, __pyx_k31, sizeof(__pyx_k31)},
+  {&__pyx_k34p, __pyx_k34, sizeof(__pyx_k34)},
+  {&__pyx_k35p, __pyx_k35, sizeof(__pyx_k35)},
+  {&__pyx_k38p, __pyx_k38, sizeof(__pyx_k38)},
+  {&__pyx_k41p, __pyx_k41, sizeof(__pyx_k41)},
+  {&__pyx_k42p, __pyx_k42, sizeof(__pyx_k42)},
+  {&__pyx_k43p, __pyx_k43, sizeof(__pyx_k43)},
+  {&__pyx_k49p, __pyx_k49, sizeof(__pyx_k49)},
+  {&__pyx_k50p, __pyx_k50, sizeof(__pyx_k50)},
+  {&__pyx_k51p, __pyx_k51, sizeof(__pyx_k51)},
+  {&__pyx_k52p, __pyx_k52, sizeof(__pyx_k52)},
+  {&__pyx_k53p, __pyx_k53, sizeof(__pyx_k53)},
+  {&__pyx_k54p, __pyx_k54, sizeof(__pyx_k54)},
+  {&__pyx_k55p, __pyx_k55, sizeof(__pyx_k55)},
+  {&__pyx_k56p, __pyx_k56, sizeof(__pyx_k56)},
+  {&__pyx_k57p, __pyx_k57, sizeof(__pyx_k57)},
+  {&__pyx_k60p, __pyx_k60, sizeof(__pyx_k60)},
+  {&__pyx_k73p, __pyx_k73, sizeof(__pyx_k73)},
+  {&__pyx_k74p, __pyx_k74, sizeof(__pyx_k74)},
+  {&__pyx_k75p, __pyx_k75, sizeof(__pyx_k75)},
+  {&__pyx_k76p, __pyx_k76, sizeof(__pyx_k76)},
+  {&__pyx_k77p, __pyx_k77, sizeof(__pyx_k77)},
+  {&__pyx_k78p, __pyx_k78, sizeof(__pyx_k78)},
+  {&__pyx_k79p, __pyx_k79, sizeof(__pyx_k79)},
+  {&__pyx_k80p, __pyx_k80, sizeof(__pyx_k80)},
+  {&__pyx_k81p, __pyx_k81, sizeof(__pyx_k81)},
+  {&__pyx_k83p, __pyx_k83, sizeof(__pyx_k83)},
+  {&__pyx_k84p, __pyx_k84, sizeof(__pyx_k84)},
+  {&__pyx_k85p, __pyx_k85, sizeof(__pyx_k85)},
+  {&__pyx_k86p, __pyx_k86, sizeof(__pyx_k86)},
+  {&__pyx_k87p, __pyx_k87, sizeof(__pyx_k87)},
+  {&__pyx_k88p, __pyx_k88, sizeof(__pyx_k88)},
+  {&__pyx_k89p, __pyx_k89, sizeof(__pyx_k89)},
+  {&__pyx_k90p, __pyx_k90, sizeof(__pyx_k90)},
+  {&__pyx_k91p, __pyx_k91, sizeof(__pyx_k91)},
+  {&__pyx_k92p, __pyx_k92, sizeof(__pyx_k92)},
+  {&__pyx_k93p, __pyx_k93, sizeof(__pyx_k93)},
+  {&__pyx_k94p, __pyx_k94, sizeof(__pyx_k94)},
+  {&__pyx_k95p, __pyx_k95, sizeof(__pyx_k95)},
+  {&__pyx_k96p, __pyx_k96, sizeof(__pyx_k96)},
+  {&__pyx_k97p, __pyx_k97, sizeof(__pyx_k97)},
+  {&__pyx_k98p, __pyx_k98, sizeof(__pyx_k98)},
+  {&__pyx_k110p, __pyx_k110, sizeof(__pyx_k110)},
+  {&__pyx_k111p, __pyx_k111, sizeof(__pyx_k111)},
+  {&__pyx_k112p, __pyx_k112, sizeof(__pyx_k112)},
+  {&__pyx_k113p, __pyx_k113, sizeof(__pyx_k113)},
+  {&__pyx_k115p, __pyx_k115, sizeof(__pyx_k115)},
+  {&__pyx_k116p, __pyx_k116, sizeof(__pyx_k116)},
+  {&__pyx_k121p, __pyx_k121, sizeof(__pyx_k121)},
+  {&__pyx_k122p, __pyx_k122, sizeof(__pyx_k122)},
+  {&__pyx_k123p, __pyx_k123, sizeof(__pyx_k123)},
+  {0, 0, 0}
+};
+
+static PyObject *__pyx_tp_new_7_mloess_loess_inputs(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  struct __pyx_obj_7_mloess_loess_inputs *p = (struct __pyx_obj_7_mloess_loess_inputs *)o;
+  p->w_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->x = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->y = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->masked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->x_eff = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->y_eff = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7_mloess_loess_inputs(PyObject *o) {
+  struct __pyx_obj_7_mloess_loess_inputs *p = (struct __pyx_obj_7_mloess_loess_inputs *)o;
+  Py_XDECREF(((PyObject *)p->w_ndr));
+  Py_XDECREF(((PyObject *)p->x));
+  Py_XDECREF(((PyObject *)p->y));
+  Py_XDECREF(((PyObject *)p->masked));
+  Py_XDECREF(((PyObject *)p->x_eff));
+  Py_XDECREF(((PyObject *)p->y_eff));
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7_mloess_loess_inputs(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7_mloess_loess_inputs *p = (struct __pyx_obj_7_mloess_loess_inputs *)o;
+  if (p->w_ndr) {
+    e = (*v)(((PyObject*)p->w_ndr), a); if (e) return e;
+  }
+  if (p->x) {
+    e = (*v)(((PyObject*)p->x), a); if (e) return e;
+  }
+  if (p->y) {
+    e = (*v)(((PyObject*)p->y), a); if (e) return e;
+  }
+  if (p->masked) {
+    e = (*v)(((PyObject*)p->masked), a); if (e) return e;
+  }
+  if (p->x_eff) {
+    e = (*v)(((PyObject*)p->x_eff), a); if (e) return e;
+  }
+  if (p->y_eff) {
+    e = (*v)(((PyObject*)p->y_eff), a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7_mloess_loess_inputs(PyObject *o) {
+  struct __pyx_obj_7_mloess_loess_inputs *p = (struct __pyx_obj_7_mloess_loess_inputs *)o;
+  Py_XDECREF(((PyObject *)p->w_ndr));
+  p->w_ndr = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->x));
+  p->x = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->y));
+  p->y = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->masked));
+  p->masked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->x_eff));
+  p->x_eff = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->y_eff));
+  p->y_eff = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_7_mloess_12loess_inputs_weights(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_12loess_inputs_7weights___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_12loess_inputs_weights(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_12loess_inputs_7weights___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static struct PyMethodDef __pyx_methods_7_mloess_loess_inputs[] = {
+  {0, 0, 0, 0}
+};
+
+static struct PyMemberDef __pyx_members_7_mloess_loess_inputs[] = {
+  {"x", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess_inputs, x), READONLY, 0},
+  {"y", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess_inputs, y), READONLY, 0},
+  {"masked", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess_inputs, masked), READONLY, 0},
+  {"x_eff", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess_inputs, x_eff), READONLY, 0},
+  {"y_eff", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess_inputs, y_eff), READONLY, 0},
+  {"nobs", T_INT, offsetof(struct __pyx_obj_7_mloess_loess_inputs, nobs), READONLY, 0},
+  {"nobs_eff", T_INT, offsetof(struct __pyx_obj_7_mloess_loess_inputs, nobs_eff), READONLY, 0},
+  {"npar", T_INT, offsetof(struct __pyx_obj_7_mloess_loess_inputs, npar), READONLY, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7_mloess_loess_inputs[] = {
+  {"weights", __pyx_getprop_7_mloess_12loess_inputs_weights, __pyx_setprop_7_mloess_12loess_inputs_weights, __pyx_k1, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_loess_inputs = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_loess_inputs = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_loess_inputs = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_loess_inputs = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+PyTypeObject __pyx_type_7_mloess_loess_inputs = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "_mloess.loess_inputs", /*tp_name*/
+  sizeof(struct __pyx_obj_7_mloess_loess_inputs), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7_mloess_loess_inputs, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_loess_inputs, /*tp_as_number*/
+  &__pyx_tp_as_sequence_loess_inputs, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_loess_inputs, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_loess_inputs, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "Loess inputs\n    \n:IVariables:\n    x : ndarray\n        A (n,p) ndarray of independent variables, with n the number of observations\n        and p the number of variables.\n    y : ndarray\n        A (n,) ndarray of observations\n    nobs : integer\n        Number of observations: nobs=n.\n    npar : integer\n        Number of independent variables: npar=p.\n    weights : ndarray\n        A (n,) ndarray of weights to be given to individual observations in the \n        sum of squared residuals that forms the local fitting criterion. If not\n        None, the weights should be non negative. If the different observations\n        have non-equal variances, the weights should be inversely proportional \n        to the variances.\n        By default, an unweighted fit is carried out (all the weights are one).\n    ", /*tp_doc*/
+  __pyx_tp_traverse_7_mloess_loess_inputs, /*tp_traverse*/
+  __pyx_tp_clear_7_mloess_loess_inputs, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7_mloess_loess_inputs, /*tp_methods*/
+  __pyx_members_7_mloess_loess_inputs, /*tp_members*/
+  __pyx_getsets_7_mloess_loess_inputs, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_f_7_mloess_12loess_inputs___init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7_mloess_loess_inputs, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+
+static PyObject *__pyx_tp_new_7_mloess_loess_control(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7_mloess_loess_control(PyObject *o) {
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7_mloess_loess_control(PyObject *o, visitproc v, void *a) {
+  return 0;
+}
+
+static int __pyx_tp_clear_7_mloess_loess_control(PyObject *o) {
+  return 0;
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_control_surface(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_control_7surface___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_13loess_control_surface(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_13loess_control_7surface___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_control_statistics(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_control_10statistics___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_13loess_control_statistics(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_13loess_control_10statistics___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_control_trace_hat(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_control_9trace_hat___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_13loess_control_trace_hat(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_13loess_control_9trace_hat___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_control_iterations(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_control_10iterations___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_13loess_control_iterations(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_13loess_control_10iterations___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_control_cell(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_control_4cell___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_13loess_control_cell(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_13loess_control_4cell___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static struct PyMethodDef __pyx_methods_7_mloess_loess_control[] = {
+  {"update", (PyCFunction)__pyx_f_7_mloess_13loess_control_update, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7_mloess_13loess_control_update},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7_mloess_loess_control[] = {
+  {"surface", __pyx_getprop_7_mloess_13loess_control_surface, __pyx_setprop_7_mloess_13loess_control_surface, __pyx_k2, 0},
+  {"statistics", __pyx_getprop_7_mloess_13loess_control_statistics, __pyx_setprop_7_mloess_13loess_control_statistics, __pyx_k3, 0},
+  {"trace_hat", __pyx_getprop_7_mloess_13loess_control_trace_hat, __pyx_setprop_7_mloess_13loess_control_trace_hat, __pyx_k4, 0},
+  {"iterations", __pyx_getprop_7_mloess_13loess_control_iterations, __pyx_setprop_7_mloess_13loess_control_iterations, __pyx_k5, 0},
+  {"cell", __pyx_getprop_7_mloess_13loess_control_cell, __pyx_setprop_7_mloess_13loess_control_cell, __pyx_k6, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_loess_control = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_loess_control = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_loess_control = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_loess_control = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+PyTypeObject __pyx_type_7_mloess_loess_control = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "_mloess.loess_control", /*tp_name*/
+  sizeof(struct __pyx_obj_7_mloess_loess_control), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7_mloess_loess_control, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_loess_control, /*tp_as_number*/
+  &__pyx_tp_as_sequence_loess_control, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_loess_control, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  __pyx_f_7_mloess_13loess_control___str__, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_loess_control, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "Loess control parameters.\n    \n:IVariables:\n    surface : string [\"interpolate\"]\n        Determines whether the fitted surface is computed directly at all points\n        (\"direct\") or whether an interpolation method is used (\"interpolate\").\n        The default (\"interpolate\") is what most users should use unless special \n        circumstances warrant.\n    statistics : string [\"approximate\"]\n        Determines whether the statistical quantities are computed exactly \n        (\"exact\") or approximately (\"approximate\"). \"exact\" should only be used \n        for testing the approximation in statistical development and is not meant \n        for routine usage because computation time can be horrendous.\n    trace_hat : string [\"wait.to.decide\"]\n        Determines how the trace of the hat matrix should be computed. The hat\n        matrix is used in the computation of the statistical quantities. \n        If \"exact\", an exact computation is done; this could be slow when the\n        number of observations n becomes large. If \"wait.to.decide\" is selected, \n        then a default is \"exact\" for n < 500 and \"approximate\" otherwise. \n        This option is only useful when the fitted surface is interpolated. If  \n        surface is \"exact\", an exact computation is always done for the trace. \n        Setting trace_hat to \"approximate\" for large dataset will substantially \n        reduce the computation time.\n    iterations : integer\n        Number of iterations of the robust fitting method. If the family is \n        \"gaussian\", the number of iterations is set to 0.\n    cell : integer\n        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),\n        where n is the number of observations, and span the smoothing parameter.\n        Then, a cell is further divided if the number of observations within it \n        is greater than or equal to k. This option is only used if the surface \n        is interpolated.\n    \n    ", /*tp_doc*/
+  __pyx_tp_traverse_7_mloess_loess_control, /*tp_traverse*/
+  __pyx_tp_clear_7_mloess_loess_control, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7_mloess_loess_control, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_7_mloess_loess_control, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7_mloess_loess_control, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+
+static PyObject *__pyx_tp_new_7_mloess_loess_kd_tree(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7_mloess_loess_kd_tree(PyObject *o) {
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7_mloess_loess_kd_tree(PyObject *o, visitproc v, void *a) {
+  return 0;
+}
+
+static int __pyx_tp_clear_7_mloess_loess_kd_tree(PyObject *o) {
+  return 0;
+}
+
+static struct PyMethodDef __pyx_methods_7_mloess_loess_kd_tree[] = {
+  {0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_loess_kd_tree = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_loess_kd_tree = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_loess_kd_tree = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_loess_kd_tree = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+PyTypeObject __pyx_type_7_mloess_loess_kd_tree = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "_mloess.loess_kd_tree", /*tp_name*/
+  sizeof(struct __pyx_obj_7_mloess_loess_kd_tree), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7_mloess_loess_kd_tree, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_loess_kd_tree, /*tp_as_number*/
+  &__pyx_tp_as_sequence_loess_kd_tree, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_loess_kd_tree, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_loess_kd_tree, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_doc*/
+  __pyx_tp_traverse_7_mloess_loess_kd_tree, /*tp_traverse*/
+  __pyx_tp_clear_7_mloess_loess_kd_tree, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7_mloess_loess_kd_tree, /*tp_methods*/
+  0, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7_mloess_loess_kd_tree, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+static struct __pyx_vtabstruct_7_mloess_loess_model __pyx_vtable_7_mloess_loess_model;
+
+static PyObject *__pyx_tp_new_7_mloess_loess_model(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  struct __pyx_obj_7_mloess_loess_model *p = (struct __pyx_obj_7_mloess_loess_model *)o;
+  *(struct __pyx_vtabstruct_7_mloess_loess_model **)&p->__pyx_vtab = __pyx_vtabptr_7_mloess_loess_model;
+  return o;
+}
+
+static void __pyx_tp_dealloc_7_mloess_loess_model(PyObject *o) {
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7_mloess_loess_model(PyObject *o, visitproc v, void *a) {
+  return 0;
+}
+
+static int __pyx_tp_clear_7_mloess_loess_model(PyObject *o) {
+  return 0;
+}
+
+static PyObject *__pyx_getprop_7_mloess_11loess_model_normalize(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_11loess_model_9normalize___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_11loess_model_normalize(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_11loess_model_9normalize___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7_mloess_11loess_model_span(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_11loess_model_4span___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_11loess_model_span(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_11loess_model_4span___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7_mloess_11loess_model_degree(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_11loess_model_6degree___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_11loess_model_degree(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_11loess_model_6degree___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7_mloess_11loess_model_family(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_11loess_model_6family___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_11loess_model_family(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_11loess_model_6family___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7_mloess_11loess_model_parametric_flags(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_11loess_model_16parametric_flags___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_11loess_model_parametric_flags(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_11loess_model_16parametric_flags___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static PyObject *__pyx_getprop_7_mloess_11loess_model_drop_square_flags(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_11loess_model_17drop_square_flags___get__(o);
+}
+
+static int __pyx_setprop_7_mloess_11loess_model_drop_square_flags(PyObject *o, PyObject *v, void *x) {
+  if (v) {
+    return __pyx_f_7_mloess_11loess_model_17drop_square_flags___set__(o, v);
+  }
+  else {
+    PyErr_SetString(PyExc_NotImplementedError, "__del__");
+    return -1;
+  }
+}
+
+static struct PyMethodDef __pyx_methods_7_mloess_loess_model[] = {
+  {"update", (PyCFunction)__pyx_f_7_mloess_11loess_model_update, METH_VARARGS|METH_KEYWORDS, 0},
+  {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7_mloess_loess_model[] = {
+  {"normalize", __pyx_getprop_7_mloess_11loess_model_normalize, __pyx_setprop_7_mloess_11loess_model_normalize, 0, 0},
+  {"span", __pyx_getprop_7_mloess_11loess_model_span, __pyx_setprop_7_mloess_11loess_model_span, 0, 0},
+  {"degree", __pyx_getprop_7_mloess_11loess_model_degree, __pyx_setprop_7_mloess_11loess_model_degree, 0, 0},
+  {"family", __pyx_getprop_7_mloess_11loess_model_family, __pyx_setprop_7_mloess_11loess_model_family, 0, 0},
+  {"parametric_flags", __pyx_getprop_7_mloess_11loess_model_parametric_flags, __pyx_setprop_7_mloess_11loess_model_parametric_flags, 0, 0},
+  {"drop_square_flags", __pyx_getprop_7_mloess_11loess_model_drop_square_flags, __pyx_setprop_7_mloess_11loess_model_drop_square_flags, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_loess_model = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_loess_model = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_loess_model = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_loess_model = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+PyTypeObject __pyx_type_7_mloess_loess_model = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "_mloess.loess_model", /*tp_name*/
+  sizeof(struct __pyx_obj_7_mloess_loess_model), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7_mloess_loess_model, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  __pyx_f_7_mloess_11loess_model___repr__, /*tp_repr*/
+  &__pyx_tp_as_number_loess_model, /*tp_as_number*/
+  &__pyx_tp_as_sequence_loess_model, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_loess_model, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  __pyx_f_7_mloess_11loess_model___str__, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_loess_model, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "loess_model contains parameters required for a loess fit.\n    \n:IVariables:\n    normalize : boolean [True]\n        Determines whether the independent variables should be normalized.  \n        If True, the normalization is performed by setting the 10% trimmed \n        standard deviation to one. If False, no normalization is carried out. \n        This option is only useful for more than one variable. For spatial\n        coordinates predictors or variables with a common scale, it should be \n        set to False.\n    span : float [0.75]\n        Smoothing factor, as a fraction of the number of points to take into\n        account. \n    degree : integer [2]\n        Overall degree of locally-fitted polynomial. 1 is locally-linear \n        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.\n    family : string [\"gaussian\"]\n        Determines the assumed distribution of the errors. The values are \n        \"gaussian\" or \"symmetric\". If \"gaussian\" is selected, the fit is \n        performed with least-squares. If \"symmetric\" is selected, the fit\n        is performed robustly by redescending M-estimators.\n    parametric_flags : sequence [ [False]*p ]\n        Indicates which independent variables should be conditionally-parametric\n        (if there are two or more independent variables). The argument should be\n        a sequence of booleans, with the same size as the number of independent \n        variables, specified in the order of the predictor group ordered in x. \n        Note: elements of the sequence cannot be modified individually: the whole\n        sequence must be given.\n    drop_square : sequence [ [False]* p]\n        When there are two or more independent variables and when a 2nd order\n        polynomial is used, \"drop_square_flags\" specifies those numeric predictors \n        whose squares should be dropped from the set of fitting variables. \n        The method of specification is the same as for parametric.  \n        Note: elements of the sequence cannot be modified individually: the whole\n        sequence must be given.\n\n    ", /*tp_doc*/
+  __pyx_tp_traverse_7_mloess_loess_model, /*tp_traverse*/
+  __pyx_tp_clear_7_mloess_loess_model, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7_mloess_loess_model, /*tp_methods*/
+  0, /*tp_members*/
+  __pyx_getsets_7_mloess_loess_model, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7_mloess_loess_model, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+static struct __pyx_vtabstruct_7_mloess_loess_outputs __pyx_vtable_7_mloess_loess_outputs;
+
+static PyObject *__pyx_tp_new_7_mloess_loess_outputs(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  struct __pyx_obj_7_mloess_loess_outputs *p = (struct __pyx_obj_7_mloess_loess_outputs *)o;
+  *(struct __pyx_vtabstruct_7_mloess_loess_outputs **)&p->__pyx_vtab = __pyx_vtabptr_7_mloess_loess_outputs;
+  p->masked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->unmasked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7_mloess_loess_outputs(PyObject *o) {
+  struct __pyx_obj_7_mloess_loess_outputs *p = (struct __pyx_obj_7_mloess_loess_outputs *)o;
+  Py_XDECREF(((PyObject *)p->masked));
+  Py_XDECREF(((PyObject *)p->unmasked));
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7_mloess_loess_outputs(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7_mloess_loess_outputs *p = (struct __pyx_obj_7_mloess_loess_outputs *)o;
+  if (p->masked) {
+    e = (*v)(((PyObject*)p->masked), a); if (e) return e;
+  }
+  if (p->unmasked) {
+    e = (*v)(((PyObject*)p->unmasked), a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7_mloess_loess_outputs(PyObject *o) {
+  struct __pyx_obj_7_mloess_loess_outputs *p = (struct __pyx_obj_7_mloess_loess_outputs *)o;
+  Py_XDECREF(((PyObject *)p->masked));
+  p->masked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->unmasked));
+  p->unmasked = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_fitted_values(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_13fitted_values___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_fitted_residuals(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_16fitted_residuals___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_pseudovalues(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_12pseudovalues___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_diagonal(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_8diagonal___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_robust(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_6robust___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_divisor(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_7divisor___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_enp(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_3enp___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_s(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_1s___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_one_delta(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_9one_delta___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_two_delta(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_9two_delta___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_13loess_outputs_trace_hat(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_13loess_outputs_9trace_hat___get__(o);
+}
+
+static struct PyMethodDef __pyx_methods_7_mloess_loess_outputs[] = {
+  {0, 0, 0, 0}
+};
+
+static struct PyMemberDef __pyx_members_7_mloess_loess_outputs[] = {
+  {"activated", T_INT, offsetof(struct __pyx_obj_7_mloess_loess_outputs, activated), READONLY, 0},
+  {"ismasked", T_INT, offsetof(struct __pyx_obj_7_mloess_loess_outputs, ismasked), READONLY, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7_mloess_loess_outputs[] = {
+  {"fitted_values", __pyx_getprop_7_mloess_13loess_outputs_fitted_values, 0, 0, 0},
+  {"fitted_residuals", __pyx_getprop_7_mloess_13loess_outputs_fitted_residuals, 0, 0, 0},
+  {"pseudovalues", __pyx_getprop_7_mloess_13loess_outputs_pseudovalues, 0, 0, 0},
+  {"diagonal", __pyx_getprop_7_mloess_13loess_outputs_diagonal, 0, 0, 0},
+  {"robust", __pyx_getprop_7_mloess_13loess_outputs_robust, 0, 0, 0},
+  {"divisor", __pyx_getprop_7_mloess_13loess_outputs_divisor, 0, 0, 0},
+  {"enp", __pyx_getprop_7_mloess_13loess_outputs_enp, 0, 0, 0},
+  {"s", __pyx_getprop_7_mloess_13loess_outputs_s, 0, 0, 0},
+  {"one_delta", __pyx_getprop_7_mloess_13loess_outputs_one_delta, 0, 0, 0},
+  {"two_delta", __pyx_getprop_7_mloess_13loess_outputs_two_delta, 0, 0, 0},
+  {"trace_hat", __pyx_getprop_7_mloess_13loess_outputs_trace_hat, 0, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_loess_outputs = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_loess_outputs = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_loess_outputs = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_loess_outputs = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+PyTypeObject __pyx_type_7_mloess_loess_outputs = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "_mloess.loess_outputs", /*tp_name*/
+  sizeof(struct __pyx_obj_7_mloess_loess_outputs), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7_mloess_loess_outputs, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_loess_outputs, /*tp_as_number*/
+  &__pyx_tp_as_sequence_loess_outputs, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_loess_outputs, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  __pyx_f_7_mloess_13loess_outputs___str__, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_loess_outputs, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "Outputs of a loess fit. This object is automatically created with empty\nvalues when a new loess object is instantiated. The object gets filled when the \nloess.fit() method is called.\n    \n:IVariables:\n    fitted_values : ndarray\n        The (n,) ndarray of fitted values.\n    fitted_residuals : ndarray\n        The (n,) ndarray of fitted residuals (observations - fitted values).\n    enp : float\n        Equivalent number of parameters.\n    s : float\n        Estimate of the scale of residuals.\n    one_delta: float\n        Statistical parameter used in the computation of standard errors.\n    two_delta : float\n        Statistical parameter used in the computation of standard errors.\n    pseudovalues : ndarray\n        The (n,) ndarray of adjusted values of the response when robust estimation \n        is used.\n    trace_hat : float    \n        Trace of the operator hat matrix.\n    diagonal : ndarray\n        Diagonal of the operator hat matrix.\n    robust : ndarray\n        The (n,) ndarray of robustness weights for robust fitting.\n    divisor : ndarray\n        The (p,) array of normalization divisors for numeric predictors.\n    ", /*tp_doc*/
+  __pyx_tp_traverse_7_mloess_loess_outputs, /*tp_traverse*/
+  __pyx_tp_clear_7_mloess_loess_outputs, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7_mloess_loess_outputs, /*tp_methods*/
+  __pyx_members_7_mloess_loess_outputs, /*tp_members*/
+  __pyx_getsets_7_mloess_loess_outputs, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7_mloess_loess_outputs, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+static struct __pyx_vtabstruct_7_mloess_conf_intervals __pyx_vtable_7_mloess_conf_intervals;
+
+static PyObject *__pyx_tp_new_7_mloess_conf_intervals(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  struct __pyx_obj_7_mloess_conf_intervals *p = (struct __pyx_obj_7_mloess_conf_intervals *)o;
+  *(struct __pyx_vtabstruct_7_mloess_conf_intervals **)&p->__pyx_vtab = __pyx_vtabptr_7_mloess_conf_intervals;
+  p->lower = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->fit = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  p->upper = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7_mloess_conf_intervals(PyObject *o) {
+  struct __pyx_obj_7_mloess_conf_intervals *p = (struct __pyx_obj_7_mloess_conf_intervals *)o;
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++o->ob_refcnt;
+    __pyx_f_7_mloess_14conf_intervals___dealloc__(o);
+    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+    --o->ob_refcnt;
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_XDECREF(((PyObject *)p->lower));
+  Py_XDECREF(((PyObject *)p->fit));
+  Py_XDECREF(((PyObject *)p->upper));
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7_mloess_conf_intervals(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7_mloess_conf_intervals *p = (struct __pyx_obj_7_mloess_conf_intervals *)o;
+  if (p->lower) {
+    e = (*v)(((PyObject*)p->lower), a); if (e) return e;
+  }
+  if (p->fit) {
+    e = (*v)(((PyObject*)p->fit), a); if (e) return e;
+  }
+  if (p->upper) {
+    e = (*v)(((PyObject*)p->upper), a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7_mloess_conf_intervals(PyObject *o) {
+  struct __pyx_obj_7_mloess_conf_intervals *p = (struct __pyx_obj_7_mloess_conf_intervals *)o;
+  Py_XDECREF(((PyObject *)p->lower));
+  p->lower = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->fit));
+  p->fit = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->upper));
+  p->upper = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
+  return 0;
+}
+
+static struct PyMethodDef __pyx_methods_7_mloess_conf_intervals[] = {
+  {0, 0, 0, 0}
+};
+
+static struct PyMemberDef __pyx_members_7_mloess_conf_intervals[] = {
+  {"lower", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_conf_intervals, lower), READONLY, 0},
+  {"fit", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_conf_intervals, fit), READONLY, 0},
+  {"upper", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_conf_intervals, upper), READONLY, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_conf_intervals = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_conf_intervals = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_conf_intervals = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_conf_intervals = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+PyTypeObject __pyx_type_7_mloess_conf_intervals = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "_mloess.conf_intervals", /*tp_name*/
+  sizeof(struct __pyx_obj_7_mloess_conf_intervals), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7_mloess_conf_intervals, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_conf_intervals, /*tp_as_number*/
+  &__pyx_tp_as_sequence_conf_intervals, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_conf_intervals, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  __pyx_f_7_mloess_14conf_intervals___str__, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_conf_intervals, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "Pointwise confidence intervals of a loess-predicted object:\n    \n:IVariables:\n    fit : ndarray\n        Predicted values.\n    lower : ndarray\n        Lower bounds of the confidence intervals.\n    upper : ndarray\n        Upper bounds of the confidence intervals.\n    ", /*tp_doc*/
+  __pyx_tp_traverse_7_mloess_conf_intervals, /*tp_traverse*/
+  __pyx_tp_clear_7_mloess_conf_intervals, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7_mloess_conf_intervals, /*tp_methods*/
+  __pyx_members_7_mloess_conf_intervals, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7_mloess_conf_intervals, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+static struct __pyx_vtabstruct_7_mloess_loess_predicted __pyx_vtable_7_mloess_loess_predicted;
+
+static PyObject *__pyx_tp_new_7_mloess_loess_predicted(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  struct __pyx_obj_7_mloess_loess_predicted *p = (struct __pyx_obj_7_mloess_loess_predicted *)o;
+  *(struct __pyx_vtabstruct_7_mloess_loess_predicted **)&p->__pyx_vtab = __pyx_vtabptr_7_mloess_loess_predicted;
+  p->confidence_intervals = ((struct __pyx_obj_7_mloess_conf_intervals *)Py_None); Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7_mloess_loess_predicted(PyObject *o) {
+  struct __pyx_obj_7_mloess_loess_predicted *p = (struct __pyx_obj_7_mloess_loess_predicted *)o;
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++o->ob_refcnt;
+    __pyx_f_7_mloess_15loess_predicted___dealloc__(o);
+    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+    --o->ob_refcnt;
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_XDECREF(((PyObject *)p->confidence_intervals));
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7_mloess_loess_predicted(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7_mloess_loess_predicted *p = (struct __pyx_obj_7_mloess_loess_predicted *)o;
+  if (p->confidence_intervals) {
+    e = (*v)(((PyObject*)p->confidence_intervals), a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7_mloess_loess_predicted(PyObject *o) {
+  struct __pyx_obj_7_mloess_loess_predicted *p = (struct __pyx_obj_7_mloess_loess_predicted *)o;
+  Py_XDECREF(((PyObject *)p->confidence_intervals));
+  p->confidence_intervals = ((struct __pyx_obj_7_mloess_conf_intervals *)Py_None); Py_INCREF(Py_None);
+  return 0;
+}
+
+static PyObject *__pyx_getprop_7_mloess_15loess_predicted_values(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_15loess_predicted_6values___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_15loess_predicted_stderr(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_15loess_predicted_6stderr___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_15loess_predicted_residual_scale(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_15loess_predicted_14residual_scale___get__(o);
+}
+
+static PyObject *__pyx_getprop_7_mloess_15loess_predicted_df(PyObject *o, void *x) {
+  return __pyx_f_7_mloess_15loess_predicted_2df___get__(o);
+}
+
+static struct PyMethodDef __pyx_methods_7_mloess_loess_predicted[] = {
+  {"confidence", (PyCFunction)__pyx_f_7_mloess_15loess_predicted_confidence, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7_mloess_15loess_predicted_confidence},
+  {0, 0, 0, 0}
+};
+
+static struct PyMemberDef __pyx_members_7_mloess_loess_predicted[] = {
+  {"nest", T_LONG, offsetof(struct __pyx_obj_7_mloess_loess_predicted, nest), READONLY, 0},
+  {"confidence_intervals", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess_predicted, confidence_intervals), READONLY, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_7_mloess_loess_predicted[] = {
+  {"values", __pyx_getprop_7_mloess_15loess_predicted_values, 0, 0, 0},
+  {"stderr", __pyx_getprop_7_mloess_15loess_predicted_stderr, 0, 0, 0},
+  {"residual_scale", __pyx_getprop_7_mloess_15loess_predicted_residual_scale, 0, 0, 0},
+  {"df", __pyx_getprop_7_mloess_15loess_predicted_df, 0, 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_loess_predicted = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_loess_predicted = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_loess_predicted = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_loess_predicted = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+PyTypeObject __pyx_type_7_mloess_loess_predicted = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "_mloess.loess_predicted", /*tp_name*/
+  sizeof(struct __pyx_obj_7_mloess_loess_predicted), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7_mloess_loess_predicted, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_loess_predicted, /*tp_as_number*/
+  &__pyx_tp_as_sequence_loess_predicted, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_loess_predicted, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  __pyx_f_7_mloess_15loess_predicted___str__, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_loess_predicted, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "Predicted values and standard errors of a loess object\n\n:IVariables:\n    values : ndarray\n        The (m,) ndarray of loess values evaluated at newdata\n    stderr : ndarray\n        The (m,) ndarray of the estimates of the standard error on the estimated\n        values.\n    residual_scale : float\n        Estimate of the scale of the residuals\n    df : integer\n        Degrees of freedom of the t-distribution used to compute pointwise \n        confidence intervals for the evaluated surface.\n    nest : integer\n        Number of new observations.\n    ", /*tp_doc*/
+  __pyx_tp_traverse_7_mloess_loess_predicted, /*tp_traverse*/
+  __pyx_tp_clear_7_mloess_loess_predicted, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7_mloess_loess_predicted, /*tp_methods*/
+  __pyx_members_7_mloess_loess_predicted, /*tp_members*/
+  __pyx_getsets_7_mloess_loess_predicted, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  0, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7_mloess_loess_predicted, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+
+static PyObject *__pyx_tp_new_7_mloess_loess(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  struct __pyx_obj_7_mloess_loess *p = (struct __pyx_obj_7_mloess_loess *)o;
+  p->inputs = ((struct __pyx_obj_7_mloess_loess_inputs *)Py_None); Py_INCREF(Py_None);
+  p->model = ((struct __pyx_obj_7_mloess_loess_model *)Py_None); Py_INCREF(Py_None);
+  p->control = ((struct __pyx_obj_7_mloess_loess_control *)Py_None); Py_INCREF(Py_None);
+  p->kd_tree = ((struct __pyx_obj_7_mloess_loess_kd_tree *)Py_None); Py_INCREF(Py_None);
+  p->outputs = ((struct __pyx_obj_7_mloess_loess_outputs *)Py_None); Py_INCREF(Py_None);
+  p->predicted = ((struct __pyx_obj_7_mloess_loess_predicted *)Py_None); Py_INCREF(Py_None);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7_mloess_loess(PyObject *o) {
+  struct __pyx_obj_7_mloess_loess *p = (struct __pyx_obj_7_mloess_loess *)o;
+  {
+    PyObject *etype, *eval, *etb;
+    PyErr_Fetch(&etype, &eval, &etb);
+    ++o->ob_refcnt;
+    __pyx_f_7_mloess_5loess___dealloc__(o);
+    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
+    --o->ob_refcnt;
+    PyErr_Restore(etype, eval, etb);
+  }
+  Py_XDECREF(((PyObject *)p->inputs));
+  Py_XDECREF(((PyObject *)p->model));
+  Py_XDECREF(((PyObject *)p->control));
+  Py_XDECREF(((PyObject *)p->kd_tree));
+  Py_XDECREF(((PyObject *)p->outputs));
+  Py_XDECREF(((PyObject *)p->predicted));
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7_mloess_loess(PyObject *o, visitproc v, void *a) {
+  int e;
+  struct __pyx_obj_7_mloess_loess *p = (struct __pyx_obj_7_mloess_loess *)o;
+  if (p->inputs) {
+    e = (*v)(((PyObject*)p->inputs), a); if (e) return e;
+  }
+  if (p->model) {
+    e = (*v)(((PyObject*)p->model), a); if (e) return e;
+  }
+  if (p->control) {
+    e = (*v)(((PyObject*)p->control), a); if (e) return e;
+  }
+  if (p->kd_tree) {
+    e = (*v)(((PyObject*)p->kd_tree), a); if (e) return e;
+  }
+  if (p->outputs) {
+    e = (*v)(((PyObject*)p->outputs), a); if (e) return e;
+  }
+  if (p->predicted) {
+    e = (*v)(((PyObject*)p->predicted), a); if (e) return e;
+  }
+  return 0;
+}
+
+static int __pyx_tp_clear_7_mloess_loess(PyObject *o) {
+  struct __pyx_obj_7_mloess_loess *p = (struct __pyx_obj_7_mloess_loess *)o;
+  Py_XDECREF(((PyObject *)p->inputs));
+  p->inputs = ((struct __pyx_obj_7_mloess_loess_inputs *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->model));
+  p->model = ((struct __pyx_obj_7_mloess_loess_model *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->control));
+  p->control = ((struct __pyx_obj_7_mloess_loess_control *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->kd_tree));
+  p->kd_tree = ((struct __pyx_obj_7_mloess_loess_kd_tree *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->outputs));
+  p->outputs = ((struct __pyx_obj_7_mloess_loess_outputs *)Py_None); Py_INCREF(Py_None);
+  Py_XDECREF(((PyObject *)p->predicted));
+  p->predicted = ((struct __pyx_obj_7_mloess_loess_predicted *)Py_None); Py_INCREF(Py_None);
+  return 0;
+}
+
+static struct PyMethodDef __pyx_methods_7_mloess_loess[] = {
+  {"fit", (PyCFunction)__pyx_f_7_mloess_5loess_fit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7_mloess_5loess_fit},
+  {"inputs_summary", (PyCFunction)__pyx_f_7_mloess_5loess_inputs_summary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7_mloess_5loess_inputs_summary},
+  {"outputs_summary", (PyCFunction)__pyx_f_7_mloess_5loess_outputs_summary, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7_mloess_5loess_outputs_summary},
+  {"predict", (PyCFunction)__pyx_f_7_mloess_5loess_predict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7_mloess_5loess_predict},
+  {0, 0, 0, 0}
+};
+
+static struct PyMemberDef __pyx_members_7_mloess_loess[] = {
+  {"inputs", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess, inputs), READONLY, 0},
+  {"model", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess, model), READONLY, 0},
+  {"control", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess, control), READONLY, 0},
+  {"kd_tree", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess, kd_tree), READONLY, 0},
+  {"outputs", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess, outputs), READONLY, 0},
+  {"predicted", T_OBJECT, offsetof(struct __pyx_obj_7_mloess_loess, predicted), READONLY, 0},
+  {"nobs", T_LONG, offsetof(struct __pyx_obj_7_mloess_loess, nobs), 0, 0},
+  {"npar", T_LONG, offsetof(struct __pyx_obj_7_mloess_loess, npar), 0, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_loess = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_loess = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_loess = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_loess = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+PyTypeObject __pyx_type_7_mloess_loess = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "_mloess.loess", /*tp_name*/
+  sizeof(struct __pyx_obj_7_mloess_loess), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7_mloess_loess, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_loess, /*tp_as_number*/
+  &__pyx_tp_as_sequence_loess, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_loess, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_loess, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  "\n    \n:Keywords:\n    x : ndarray\n        A (n,p) ndarray of independent variables, with n the number of observations\n        and p the number of variables.\n    y : ndarray\n        A (n,) ndarray of observations\n    weights : ndarray\n        A (n,) ndarray of weights to be given to individual observations in the \n        sum of squared residuals that forms the local fitting criterion. If not\n        None, the weights should be non negative. If the different observations\n        have non-equal variances, the weights should be inversely proportional \n        to the variances.\n        By default, an unweighted fit is carried out (all the weights are one).\n    surface : string [\"interpolate\"]\n        Determines whether the fitted surface is computed directly at all points\n        (\"direct\") or whether an interpolation method is used (\"interpolate\").\n        The default (\"interpolate\") is what most users should use unless special \n        circumstances warrant.\n    statistics : string [\"approximate\"]\n        Determines whether the statistical quantities are computed exactly \n        (\"exact\") or approximately (\"approximate\"). \"exact\" should only be used \n        for testing the approximation in statistical development and is not meant \n        for routine usage because computation time can be horrendous.\n    trace_hat : string [\"wait.to.decide\"]\n        Determines how the trace of the hat matrix should be computed. The hat\n        matrix is used in the computation of the statistical quantities. \n        If \"exact\", an exact computation is done; this could be slow when the\n        number of observations n becomes large. If \"wait.to.decide\" is selected, \n        then a default is \"exact\" for n < 500 and \"approximate\" otherwise. \n        This option is only useful when the fitted surface is interpolated. If  \n        surface is \"exact\", an exact computation is always done for the trace. \n        Setting trace_hat to \"approximate\" for large dataset will substantially \n        reduce the computation time.\n    iterations : integer\n        Number of iterations of the robust fitting method. If the family is \n        \"gaussian\", the number of iterations is set to 0.\n    cell : integer\n        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),\n        where n is the number of observations, and span the smoothing parameter.\n        Then, a cell is further divided if the number of observations within it \n        is greater than or equal to k. This option is only used if the surface \n        is interpolated.\n    span : float [0.75]\n        Smoothing factor, as a fraction of the number of points to take into\n        account. \n    degree : integer [2]\n        Overall degree of locally-fitted polynomial. 1 is locally-linear \n        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.\n    normalize : boolean [True]\n        Determines whether the independent variables should be normalized.  \n        If True, the normalization is performed by setting the 10% trimmed \n        standard deviation to one. If False, no normalization is carried out. \n        This option is only useful for more than one variable. For spatial\n        coordinates predictors or variables with a common scale, it should be \n        set to False.\n    family : string [\"gaussian\"]\n        Determines the assumed distribution of the errors. The values are \n        \"gaussian\" or \"symmetric\". If \"gaussian\" is selected, the fit is \n        performed with least-squares. If \"symmetric\" is selected, the fit\n        is performed robustly by redescending M-estimators.\n    parametric_flags : sequence [ [False]*p ]\n        Indicates which independent variables should be conditionally-parametric\n       (if there are two or more independent variables). The argument should \n       be a sequence of booleans, with the same size as the number of independent \n       variables, specified in the order of the predictor group ordered in x. \n    drop_square : sequence [ [False]* p]\n        When there are two or more independent variables and when a 2nd order\n        polynomial is used, \"drop_square_flags\" specifies those numeric predictors \n        whose squares should be dropped from the set of fitting variables. \n        The method of specification is the same as for parametric.  \n        \n:Outputs:\n    fitted_values : ndarray\n        The (n,) ndarray of fitted values.\n    fitted_residuals : ndarray\n        The (n,) ndarray of fitted residuals (observations - fitted values).\n    enp : float\n        Equivalent number of parameters.\n    s : float\n        Estimate of the scale of residuals.\n    one_delta: float\n        Statistical parameter used in the computation of standard errors.\n    two_delta : float\n        Statistical parameter used in the computation of standard errors.\n    pseudovalues : ndarray\n        The (n,) ndarray of adjusted values of the response when robust estimation \n        is used.\n    trace_hat : float    \n        Trace of the operator hat matrix.\n    diagonal :\n        Diagonal of the operator hat matrix.\n    robust : ndarray\n        The (n,) ndarray of robustness weights for robust fitting.\n    divisor : ndarray\n        The (p,) array of normalization divisors for numeric predictors.\n\n    ", /*tp_doc*/
+  __pyx_tp_traverse_7_mloess_loess, /*tp_traverse*/
+  __pyx_tp_clear_7_mloess_loess, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7_mloess_loess, /*tp_methods*/
+  __pyx_members_7_mloess_loess, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_f_7_mloess_5loess___init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7_mloess_loess, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+
+static PyObject *__pyx_tp_new_7_mloess_anova(PyTypeObject *t, PyObject *a, PyObject *k) {
+  PyObject *o = (*t->tp_alloc)(t, 0);
+  return o;
+}
+
+static void __pyx_tp_dealloc_7_mloess_anova(PyObject *o) {
+  (*o->ob_type->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_7_mloess_anova(PyObject *o, visitproc v, void *a) {
+  return 0;
+}
+
+static int __pyx_tp_clear_7_mloess_anova(PyObject *o) {
+  return 0;
+}
+
+static struct PyMethodDef __pyx_methods_7_mloess_anova[] = {
+  {0, 0, 0, 0}
+};
+
+static struct PyMemberDef __pyx_members_7_mloess_anova[] = {
+  {"dfn", T_DOUBLE, offsetof(struct __pyx_obj_7_mloess_anova, dfn), READONLY, 0},
+  {"dfd", T_DOUBLE, offsetof(struct __pyx_obj_7_mloess_anova, dfd), READONLY, 0},
+  {"F_value", T_DOUBLE, offsetof(struct __pyx_obj_7_mloess_anova, F_value), READONLY, 0},
+  {"Pr_F", T_DOUBLE, offsetof(struct __pyx_obj_7_mloess_anova, Pr_F), READONLY, 0},
+  {0, 0, 0, 0, 0}
+};
+
+static PyNumberMethods __pyx_tp_as_number_anova = {
+  0, /*nb_add*/
+  0, /*nb_subtract*/
+  0, /*nb_multiply*/
+  0, /*nb_divide*/
+  0, /*nb_remainder*/
+  0, /*nb_divmod*/
+  0, /*nb_power*/
+  0, /*nb_negative*/
+  0, /*nb_positive*/
+  0, /*nb_absolute*/
+  0, /*nb_nonzero*/
+  0, /*nb_invert*/
+  0, /*nb_lshift*/
+  0, /*nb_rshift*/
+  0, /*nb_and*/
+  0, /*nb_xor*/
+  0, /*nb_or*/
+  0, /*nb_coerce*/
+  0, /*nb_int*/
+  0, /*nb_long*/
+  0, /*nb_float*/
+  0, /*nb_oct*/
+  0, /*nb_hex*/
+  0, /*nb_inplace_add*/
+  0, /*nb_inplace_subtract*/
+  0, /*nb_inplace_multiply*/
+  0, /*nb_inplace_divide*/
+  0, /*nb_inplace_remainder*/
+  0, /*nb_inplace_power*/
+  0, /*nb_inplace_lshift*/
+  0, /*nb_inplace_rshift*/
+  0, /*nb_inplace_and*/
+  0, /*nb_inplace_xor*/
+  0, /*nb_inplace_or*/
+  0, /*nb_floor_divide*/
+  0, /*nb_true_divide*/
+  0, /*nb_inplace_floor_divide*/
+  0, /*nb_inplace_true_divide*/
+};
+
+static PySequenceMethods __pyx_tp_as_sequence_anova = {
+  0, /*sq_length*/
+  0, /*sq_concat*/
+  0, /*sq_repeat*/
+  0, /*sq_item*/
+  0, /*sq_slice*/
+  0, /*sq_ass_item*/
+  0, /*sq_ass_slice*/
+  0, /*sq_contains*/
+  0, /*sq_inplace_concat*/
+  0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping_anova = {
+  0, /*mp_length*/
+  0, /*mp_subscript*/
+  0, /*mp_ass_subscript*/
+};
+
+static PyBufferProcs __pyx_tp_as_buffer_anova = {
+  0, /*bf_getreadbuffer*/
+  0, /*bf_getwritebuffer*/
+  0, /*bf_getsegcount*/
+  0, /*bf_getcharbuffer*/
+};
+
+PyTypeObject __pyx_type_7_mloess_anova = {
+  PyObject_HEAD_INIT(0)
+  0, /*ob_size*/
+  "_mloess.anova", /*tp_name*/
+  sizeof(struct __pyx_obj_7_mloess_anova), /*tp_basicsize*/
+  0, /*tp_itemsize*/
+  __pyx_tp_dealloc_7_mloess_anova, /*tp_dealloc*/
+  0, /*tp_print*/
+  0, /*tp_getattr*/
+  0, /*tp_setattr*/
+  0, /*tp_compare*/
+  0, /*tp_repr*/
+  &__pyx_tp_as_number_anova, /*tp_as_number*/
+  &__pyx_tp_as_sequence_anova, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_anova, /*tp_as_mapping*/
+  0, /*tp_hash*/
+  0, /*tp_call*/
+  0, /*tp_str*/
+  0, /*tp_getattro*/
+  0, /*tp_setattro*/
+  &__pyx_tp_as_buffer_anova, /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+  0, /*tp_doc*/
+  __pyx_tp_traverse_7_mloess_anova, /*tp_traverse*/
+  __pyx_tp_clear_7_mloess_anova, /*tp_clear*/
+  0, /*tp_richcompare*/
+  0, /*tp_weaklistoffset*/
+  0, /*tp_iter*/
+  0, /*tp_iternext*/
+  __pyx_methods_7_mloess_anova, /*tp_methods*/
+  __pyx_members_7_mloess_anova, /*tp_members*/
+  0, /*tp_getset*/
+  0, /*tp_base*/
+  0, /*tp_dict*/
+  0, /*tp_descr_get*/
+  0, /*tp_descr_set*/
+  0, /*tp_dictoffset*/
+  __pyx_f_7_mloess_5anova___init__, /*tp_init*/
+  0, /*tp_alloc*/
+  __pyx_tp_new_7_mloess_anova, /*tp_new*/
+  0, /*tp_free*/
+  0, /*tp_is_gc*/
+  0, /*tp_bases*/
+  0, /*tp_mro*/
+  0, /*tp_cache*/
+  0, /*tp_subclasses*/
+  0, /*tp_weaklist*/
+};
+
+static struct PyMethodDef __pyx_methods[] = {
+  {0, 0, 0, 0}
+};
+
+static void __pyx_init_filenames(void); /*proto*/
+
+PyMODINIT_FUNC init_mloess(void); /*proto*/
+PyMODINIT_FUNC init_mloess(void) {
+  PyObject *__pyx_1 = 0;
+  PyObject *__pyx_2 = 0;
+  __pyx_init_filenames();
+  __pyx_m = Py_InitModule4("_mloess", __pyx_methods, 0, 0, PYTHON_API_VERSION);
+  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
+  __pyx_b = PyImport_AddModule("__builtin__");
+  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
+  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
+  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
+  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
+  __pyx_type_7_mloess_loess_inputs.tp_free = _PyObject_GC_Del;
+  if (PyType_Ready(&__pyx_type_7_mloess_loess_inputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_inputs", (PyObject *)&__pyx_type_7_mloess_loess_inputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L1;}
+  __pyx_ptype_7_mloess_loess_inputs = &__pyx_type_7_mloess_loess_inputs;
+  if (PyType_Ready(&__pyx_type_7_mloess_loess_control) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_control", (PyObject *)&__pyx_type_7_mloess_loess_control) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; goto __pyx_L1;}
+  __pyx_ptype_7_mloess_loess_control = &__pyx_type_7_mloess_loess_control;
+  if (PyType_Ready(&__pyx_type_7_mloess_loess_kd_tree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_kd_tree", (PyObject *)&__pyx_type_7_mloess_loess_kd_tree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; goto __pyx_L1;}
+  __pyx_ptype_7_mloess_loess_kd_tree = &__pyx_type_7_mloess_loess_kd_tree;
+  __pyx_vtabptr_7_mloess_loess_model = &__pyx_vtable_7_mloess_loess_model;
+  *(void(**)())&__pyx_vtable_7_mloess_loess_model.setup = (void(*)())__pyx_f_7_mloess_11loess_model_setup;
+  if (PyType_Ready(&__pyx_type_7_mloess_loess_model) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;}
+  if (__Pyx_SetVtable(__pyx_type_7_mloess_loess_model.tp_dict, __pyx_vtabptr_7_mloess_loess_model) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_model", (PyObject *)&__pyx_type_7_mloess_loess_model) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; goto __pyx_L1;}
+  __pyx_ptype_7_mloess_loess_model = &__pyx_type_7_mloess_loess_model;
+  __pyx_vtabptr_7_mloess_loess_outputs = &__pyx_vtable_7_mloess_loess_outputs;
+  *(void(**)())&__pyx_vtable_7_mloess_loess_outputs.setup = (void(*)())__pyx_f_7_mloess_13loess_outputs_setup;
+  *(void(**)())&__pyx_vtable_7_mloess_loess_outputs.getoutput = (void(*)())__pyx_f_7_mloess_13loess_outputs_getoutput;
+  __pyx_type_7_mloess_loess_outputs.tp_free = _PyObject_GC_Del;
+  if (PyType_Ready(&__pyx_type_7_mloess_loess_outputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;}
+  if (__Pyx_SetVtable(__pyx_type_7_mloess_loess_outputs.tp_dict, __pyx_vtabptr_7_mloess_loess_outputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_outputs", (PyObject *)&__pyx_type_7_mloess_loess_outputs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; goto __pyx_L1;}
+  __pyx_ptype_7_mloess_loess_outputs = &__pyx_type_7_mloess_loess_outputs;
+  __pyx_vtabptr_7_mloess_conf_intervals = &__pyx_vtable_7_mloess_conf_intervals;
+  *(void(**)())&__pyx_vtable_7_mloess_conf_intervals.setup = (void(*)())__pyx_f_7_mloess_14conf_intervals_setup;
+  __pyx_type_7_mloess_conf_intervals.tp_free = _PyObject_GC_Del;
+  if (PyType_Ready(&__pyx_type_7_mloess_conf_intervals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; goto __pyx_L1;}
+  if (__Pyx_SetVtable(__pyx_type_7_mloess_conf_intervals.tp_dict, __pyx_vtabptr_7_mloess_conf_intervals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "conf_intervals", (PyObject *)&__pyx_type_7_mloess_conf_intervals) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; goto __pyx_L1;}
+  __pyx_ptype_7_mloess_conf_intervals = &__pyx_type_7_mloess_conf_intervals;
+  __pyx_vtabptr_7_mloess_loess_predicted = &__pyx_vtable_7_mloess_loess_predicted;
+  *(void(**)())&__pyx_vtable_7_mloess_loess_predicted.setup = (void(*)())__pyx_f_7_mloess_15loess_predicted_setup;
+  __pyx_type_7_mloess_loess_predicted.tp_free = _PyObject_GC_Del;
+  if (PyType_Ready(&__pyx_type_7_mloess_loess_predicted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;}
+  if (__Pyx_SetVtable(__pyx_type_7_mloess_loess_predicted.tp_dict, __pyx_vtabptr_7_mloess_loess_predicted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess_predicted", (PyObject *)&__pyx_type_7_mloess_loess_predicted) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;}
+  __pyx_ptype_7_mloess_loess_predicted = &__pyx_type_7_mloess_loess_predicted;
+  __pyx_type_7_mloess_loess.tp_free = _PyObject_GC_Del;
+  if (PyType_Ready(&__pyx_type_7_mloess_loess) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "loess", (PyObject *)&__pyx_type_7_mloess_loess) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
+  __pyx_ptype_7_mloess_loess = &__pyx_type_7_mloess_loess;
+  if (PyType_Ready(&__pyx_type_7_mloess_anova) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;}
+  if (PyObject_SetAttrString(__pyx_m, "anova", (PyObject *)&__pyx_type_7_mloess_anova) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;}
+  __pyx_ptype_7_mloess_anova = &__pyx_type_7_mloess_anova;
+  __pyx_ptype_7c_numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (!__pyx_ptype_7c_numpy_dtype) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; goto __pyx_L1;}
+  __pyx_ptype_7c_numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (!__pyx_ptype_7c_numpy_ndarray) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; goto __pyx_L1;}
+  __pyx_ptype_7c_numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject)); if (!__pyx_ptype_7c_numpy_flatiter) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; goto __pyx_L1;}
+  __pyx_ptype_7c_numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject)); if (!__pyx_ptype_7c_numpy_broadcast) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; goto __pyx_L1;}
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":8 */
+  __pyx_1 = __Pyx_Import(__pyx_n_numpy, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_numpy, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":9 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_array); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_narray, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":10 */
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_numpy); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
+  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_float_); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_float_, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":11 */
+  __pyx_1 = __Pyx_Import(__pyx_n_maskedarray, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_maskedarray, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":12 */
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_maskedarray); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_masked_array); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_marray, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":13 */
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_maskedarray); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
+  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_getmaskarray); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
+  Py_DECREF(__pyx_2); __pyx_2 = 0;
+  if (PyObject_SetAttr(__pyx_m, __pyx_n_getmaskarray, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
+  Py_DECREF(__pyx_1); __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":16 */
+  import_array();
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":39 */
+  __pyx_k9;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":636 */
+  __pyx_2 = PyFloat_FromDouble(0.95); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;}
+  __pyx_k10 = __pyx_2;
+  __pyx_2 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":786 */
+  Py_INCREF(Py_None);
+  __pyx_k11 = Py_None;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":850 */
+  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;}
+  __pyx_k12 = __pyx_1;
+  __pyx_1 = 0;
+
+  /* "/home/backtopop/workspace/pyloess/src/_mloess.pyx":918 */
+  return;
+  __pyx_L1:;
+  Py_XDECREF(__pyx_1);
+  Py_XDECREF(__pyx_2);
+  __Pyx_AddTraceback("_mloess");
+}
+
+static char *__pyx_filenames[] = {
+  "_mloess.pyx",
+  "c_numpy.pxd",
+};
+
+/* Runtime support code */
+
+static void __pyx_init_filenames(void) {
+  __pyx_f = __pyx_filenames;
+}
+
+static int __Pyx_GetStarArgs(
+    PyObject **args, 
+    PyObject **kwds,
+    char *kwd_list[], 
+    int nargs,
+    PyObject **args2, 
+    PyObject **kwds2)
+{
+    PyObject *x = 0, *args1 = 0, *kwds1 = 0;
+    
+    if (args2)
+        *args2 = 0;
+    if (kwds2)
+        *kwds2 = 0;
+    
+    if (args2) {
+        args1 = PyTuple_GetSlice(*args, 0, nargs);
+        if (!args1)
+            goto bad;
+        *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_Size(*args));
+        if (!*args2)
+            goto bad;
+    }
+    else {
+        args1 = *args;
+        Py_INCREF(args1);
+    }
+    
+    if (kwds2) {
+        if (*kwds) {
+            char **p;
+            kwds1 = PyDict_New();
+            if (!kwds)
+                goto bad;
+            *kwds2 = PyDict_Copy(*kwds);
+            if (!*kwds2)
+                goto bad;
+            for (p = kwd_list; *p; p++) {
+                x = PyDict_GetItemString(*kwds, *p);
+                if (x) {
+                    if (PyDict_SetItemString(kwds1, *p, x) < 0)
+                        goto bad;
+                    if (PyDict_DelItemString(*kwds2, *p) < 0)
+                        goto bad;
+                }
+            }
+        }
+        else {
+            *kwds2 = PyDict_New();
+            if (!*kwds2)
+                goto bad;
+        }
+    }
+    else {
+        kwds1 = *kwds;
+        Py_XINCREF(kwds1);
+    }
+    
+    *args = args1;
+    *kwds = kwds1;
+    return 0;
+bad:
+    Py_XDECREF(args1);
+    Py_XDECREF(kwds1);
+    if (*args2) {
+        Py_XDECREF(*args2);
+    }
+    if (*kwds2) {
+        Py_XDECREF(*kwds2);
+    }
+    return -1;
+}
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
+    PyObject *__import__ = 0;
+    PyObject *empty_list = 0;
+    PyObject *module = 0;
+    PyObject *global_dict = 0;
+    PyObject *empty_dict = 0;
+    PyObject *list;
+    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
+    if (!__import__)
+        goto bad;
+    if (from_list)
+        list = from_list;
+    else {
+        empty_list = PyList_New(0);
+        if (!empty_list)
+            goto bad;
+        list = empty_list;
+    }
+    global_dict = PyModule_GetDict(__pyx_m);
+    if (!global_dict)
+        goto bad;
+    empty_dict = PyDict_New();
+    if (!empty_dict)
+        goto bad;
+    module = PyObject_CallFunction(__import__, "OOOO",
+        name, global_dict, empty_dict, list);
+bad:
+    Py_XDECREF(empty_list);
+    Py_XDECREF(__import__);
+    Py_XDECREF(empty_dict);
+    return module;
+}
+
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
+    PyObject *result;
+    result = PyObject_GetAttr(dict, name);
+    if (!result)
+        PyErr_SetObject(PyExc_NameError, name);
+    return result;
+}
+
+static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+    if (!type) {
+        PyErr_Format(PyExc_SystemError, "Missing type object");
+        return 0;
+    }
+    if (obj == Py_None || PyObject_TypeCheck(obj, type))
+        return 1;
+    PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
+        obj->ob_type->tp_name, type->tp_name);
+    return 0;
+}
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
+    Py_XINCREF(type);
+    Py_XINCREF(value);
+    Py_XINCREF(tb);
+    /* First, check the traceback argument, replacing None with NULL. */
+    if (tb == Py_None) {
+        Py_DECREF(tb);
+        tb = 0;
+    }
+    else if (tb != NULL && !PyTraceBack_Check(tb)) {
+        PyErr_SetString(PyExc_TypeError,
+            "raise: arg 3 must be a traceback or None");
+        goto raise_error;
+    }
+    /* Next, replace a missing value with None */
+    if (value == NULL) {
+        value = Py_None;
+        Py_INCREF(value);
+    }
+    /* Next, repeatedly, replace a tuple exception with its first item */
+    while (PyTuple_Check(type) && PyTuple_Size(type) > 0) {
+        PyObject *tmp = type;
+        type = PyTuple_GET_ITEM(type, 0);
+        Py_INCREF(type);
+        Py_DECREF(tmp);
+    }
+    if (PyString_Check(type)) {
+        if (PyErr_Warn(PyExc_DeprecationWarning,
+                "raising a string exception is deprecated"))
+            goto raise_error;
+    }
+    else if (PyType_Check(type) || PyClass_Check(type))
+        ; /*PyErr_NormalizeException(&type, &value, &tb);*/
+    else {
+        /* Raising an instance.  The value should be a dummy. */
+        if (value != Py_None) {
+            PyErr_SetString(PyExc_TypeError,
+                "instance exception may not have a separate value");
+            goto raise_error;
+        }
+        /* Normalize to raise <class>, <instance> */
+        Py_DECREF(value);
+        value = type;
+        if (PyInstance_Check(type))
+            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
+        else
+            type = (PyObject*) type->ob_type;
+        Py_INCREF(type);
+    }
+    PyErr_Restore(type, value, tb);
+    return;
+raise_error:
+    Py_XDECREF(value);
+    Py_XDECREF(type);
+    Py_XDECREF(tb);
+    return;
+}
+
+static void __Pyx_UnpackError(void) {
+    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
+}
+
+static PyObject *__Pyx_UnpackItem(PyObject *iter) {
+    PyObject *item;
+    if (!(item = PyIter_Next(iter))) {
+        if (!PyErr_Occurred())
+            __Pyx_UnpackError();
+    }
+    return item;
+}
+
+static int __Pyx_EndUnpack(PyObject *iter) {
+    PyObject *item;
+    if ((item = PyIter_Next(iter))) {
+        Py_DECREF(item);
+        __Pyx_UnpackError();
+        return -1;
+    }
+    else if (!PyErr_Occurred())
+        return 0;
+    else
+        return -1;
+}
+
+static PyObject *__Pyx_GetStdout(void) {
+    PyObject *f = PySys_GetObject("stdout");
+    if (!f) {
+        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
+    }
+    return f;
+}
+
+static int __Pyx_PrintItem(PyObject *v) {
+    PyObject *f;
+    
+    if (!(f = __Pyx_GetStdout()))
+        return -1;
+    if (PyFile_SoftSpace(f, 1)) {
+        if (PyFile_WriteString(" ", f) < 0)
+            return -1;
+    }
+    if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
+        return -1;
+    if (PyString_Check(v)) {
+        char *s = PyString_AsString(v);
+        int len = PyString_Size(v);
+        if (len > 0 &&
+            isspace(Py_CHARMASK(s[len-1])) &&
+            s[len-1] != ' ')
+                PyFile_SoftSpace(f, 0);
+    }
+    return 0;
+}
+
+static int __Pyx_PrintNewline(void) {
+    PyObject *f;
+    
+    if (!(f = __Pyx_GetStdout()))
+        return -1;
+    if (PyFile_WriteString("\n", f) < 0)
+        return -1;
+    PyFile_SoftSpace(f, 0);
+    return 0;
+}
+
+static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
+    while (t->p) {
+        *t->p = PyString_InternFromString(t->s);
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+    while (t->p) {
+        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+        if (!*t->p)
+            return -1;
+        ++t;
+    }
+    return 0;
+}
+
+static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+    PyObject *pycobj = 0;
+    int result;
+    
+    pycobj = PyCObject_FromVoidPtr(vtable, 0);
+    if (!pycobj)
+        goto bad;
+    if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0)
+        goto bad;
+    result = 0;
+    goto done;
+
+bad:
+    result = -1;
+done:
+    Py_XDECREF(pycobj);
+    return result;
+}
+
+static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, 
+    long size) 
+{
+    PyObject *py_module_name = 0;
+    PyObject *py_class_name = 0;
+    PyObject *py_name_list = 0;
+    PyObject *py_module = 0;
+    PyObject *result = 0;
+    
+    py_module_name = PyString_FromString(module_name);
+    if (!py_module_name)
+        goto bad;
+    py_class_name = PyString_FromString(class_name);
+    if (!py_class_name)
+        goto bad;
+    py_name_list = PyList_New(1);
+    if (!py_name_list)
+        goto bad;
+    Py_INCREF(py_class_name);
+    if (PyList_SetItem(py_name_list, 0, py_class_name) < 0)
+        goto bad;
+    py_module = __Pyx_Import(py_module_name, py_name_list);
+    if (!py_module)
+        goto bad;
+    result = PyObject_GetAttr(py_module, py_class_name);
+    if (!result)
+        goto bad;
+    if (!PyType_Check(result)) {
+        PyErr_Format(PyExc_TypeError, 
+            "%s.%s is not a type object",
+            module_name, class_name);
+        goto bad;
+    }
+    if (((PyTypeObject *)result)->tp_basicsize != size) {
+        PyErr_Format(PyExc_ValueError, 
+            "%s.%s does not appear to be the correct type object",
+            module_name, class_name);
+        goto bad;
+    }
+    goto done;
+bad:
+    Py_XDECREF(result);
+    result = 0;
+done:
+    Py_XDECREF(py_module_name);
+    Py_XDECREF(py_class_name);
+    Py_XDECREF(py_name_list);
+    return (PyTypeObject *)result;
+}
+
+#include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+
+static void __Pyx_AddTraceback(char *funcname) {
+    PyObject *py_srcfile = 0;
+    PyObject *py_funcname = 0;
+    PyObject *py_globals = 0;
+    PyObject *empty_tuple = 0;
+    PyObject *empty_string = 0;
+    PyCodeObject *py_code = 0;
+    PyFrameObject *py_frame = 0;
+    
+    py_srcfile = PyString_FromString(__pyx_filename);
+    if (!py_srcfile) goto bad;
+    py_funcname = PyString_FromString(funcname);
+    if (!py_funcname) goto bad;
+    py_globals = PyModule_GetDict(__pyx_m);
+    if (!py_globals) goto bad;
+    empty_tuple = PyTuple_New(0);
+    if (!empty_tuple) goto bad;
+    empty_string = PyString_FromString("");
+    if (!empty_string) goto bad;
+    py_code = PyCode_New(
+        0,            /*int argcount,*/
+        0,            /*int nlocals,*/
+        0,            /*int stacksize,*/
+        0,            /*int flags,*/
+        empty_string, /*PyObject *code,*/
+        empty_tuple,  /*PyObject *consts,*/
+        empty_tuple,  /*PyObject *names,*/
+        empty_tuple,  /*PyObject *varnames,*/
+        empty_tuple,  /*PyObject *freevars,*/
+        empty_tuple,  /*PyObject *cellvars,*/
+        py_srcfile,   /*PyObject *filename,*/
+        py_funcname,  /*PyObject *name,*/
+        __pyx_lineno,   /*int firstlineno,*/
+        empty_string  /*PyObject *lnotab*/
+    );
+    if (!py_code) goto bad;
+    py_frame = PyFrame_New(
+        PyThreadState_Get(), /*PyThreadState *tstate,*/
+        py_code,             /*PyCodeObject *code,*/
+        py_globals,          /*PyObject *globals,*/
+        0                    /*PyObject *locals*/
+    );
+    if (!py_frame) goto bad;
+    py_frame->f_lineno = __pyx_lineno;
+    PyTraceBack_Here(py_frame);
+bad:
+    Py_XDECREF(py_srcfile);
+    Py_XDECREF(py_funcname);
+    Py_XDECREF(empty_tuple);
+    Py_XDECREF(empty_string);
+    Py_XDECREF(py_code);
+    Py_XDECREF(py_frame);
+}

Added: trunk/Lib/sandbox/pyloess/src/_mloess.pyx
===================================================================
--- trunk/Lib/sandbox/pyloess/src/_mloess.pyx	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/src/_mloess.pyx	2007-03-27 06:38:36 UTC (rev 2874)
@@ -0,0 +1,958 @@
+# -*- Mode: Python -*-  
+cimport c_python
+cimport c_numpy
+from c_numpy cimport ndarray, npy_intp, \
+    PyArray_SIZE, PyArray_EMPTY, PyArray_FROMANY, \
+    NPY_INT, NPY_DOUBLE, NPY_OWNDATA, NPY_ALIGNED, NPY_FORTRAN, \
+    PyArray_SimpleNewFromData
+import numpy
+narray = numpy.array
+float_ = numpy.float_
+import maskedarray
+marray = maskedarray.masked_array
+getmaskarray = maskedarray.getmaskarray
+
+# NumPy must be initialized
+c_numpy.import_array()
+
+cimport c_loess
+
+cdef floatarray_from_data(int rows, int cols, double *data):
+    cdef ndarray a_ndr
+    cdef npy_intp size
+    size = rows*cols
+    a_ndr = <object>PyArray_SimpleNewFromData(1, &size, NPY_DOUBLE, data)
+    if cols > 1:
+        a_ndr.shape = (rows, cols)
+    return a_ndr
+
+cdef boolarray_from_data(int rows, int cols, int *data):
+    cdef ndarray a_ndr
+    cdef npy_intp size
+    size = rows*cols
+    a_ndr = <object>PyArray_SimpleNewFromData(1, &size, NPY_DOUBLE, data)
+    if cols > 1:
+        a_ndr.shape = (rows, cols)
+    return a_ndr.astype(numpy.bool)
+
+
+"""
+        
+
+    newdata : ndarray
+        The (m,p) array of independent variables where the surface must be estimated.
+    values : ndarray
+        The (m,) ndarray of loess values evaluated at newdata
+    stderr : ndarray
+        The (m,) ndarray of the estimates of the standard error on the estimated
+        values.
+    residual_scale : float
+        Estimate of the scale of the residuals
+    df : integer
+        Degrees of freedom of the t-distribution used to compute pointwise 
+        confidence intervals for the evaluated surface.
+    nest : integer
+        Number of new observations.
+       
+        
+"""
+
+
+#####---------------------------------------------------------------------------
+#---- ---- loess model ---
+#####---------------------------------------------------------------------------
+cdef class loess_inputs:
+    """Loess inputs
+    
+:IVariables:
+    x : ndarray
+        A (n,p) ndarray of independent variables, with n the number of observations
+        and p the number of variables.
+    y : ndarray
+        A (n,) ndarray of observations.
+    masked : ndarray
+        A (n,) ndarry of booleans indicating the missing observations and responses.
+    nobs : integer
+        Number of observations: nobs=n.
+    nobs_eff : integer
+        Number of effective observations.
+    npar : integer
+        Number of independent variables: npar=p.
+    weights : ndarray
+        A (n,) ndarray of weights to be given to individual observations in the 
+        sum of squared residuals that forms the local fitting criterion. If not
+        None, the weights should be non negative. If the different observations
+        have non-equal variances, the weights should be inversely proportional 
+        to the variances.
+        By default, an unweighted fit is carried out (all the weights are one).
+    """
+    cdef c_loess.c_loess_inputs *_base
+    cdef ndarray w_ndr
+    cdef readonly ndarray x, y, masked, x_eff, y_eff
+    cdef readonly int nobs, nobs_eff, npar
+    #.........
+    def __init__(self, x_data, y_data):
+        cdef ndarray unmasked
+        self.x = marray(x_data, copy=False, subok=True, dtype=float_, order='C')
+        self.y = marray(y_data, copy=False, subok=True, dtype=float_, order='C')
+        # Check the dimensions ........
+        if self.x.ndim == 1:
+            self.npar = 1
+            self.masked = maskedarray.mask_or(getmaskarray(self.x),
+                                              getmaskarray(self.y), 
+                                              small_mask=False) 
+        elif self.x.ndim == 2:
+            self.npar = self.x.shape[-1]
+            self.masked = maskedarray.mask_or(getmaskarray(self.x).any(axis=1),
+                                              getmaskarray(self.y),
+                                              small_mask=False) 
+        else:
+            raise ValueError("The array of indepedent varibales should be 2D at most!")
+        self.nobs = len(self.x)         
+        self.nobs_eff = self.nobs - self.masked.sum()
+        # Get the effective data ......
+        unmasked = numpy.logical_not(self.masked)
+        self.x_eff = self.x[unmasked].ravel()
+        self.y_eff = self.y[unmasked]
+        self.w_ndr = numpy.ones((self.nobs,), dtype=float_)
+    #.........    
+    property weights:
+        """A (n,) ndarray of weights to be given to individual observations in the 
+        sum of squared residuals that forms the local fitting criterion. If not
+        None, the weights should be non negative. If the different observations
+        have non-equal variances, the weights should be inversely proportional 
+        to the variances.
+        By default, an unweighted fit is carried out (all the weights are one).
+        """
+        def __get__(self):
+            return self.w_ndr
+        
+        def __set__(self, w):
+            cdef npy_intp *dims
+            cdef ndarray w_ndr, unmasked
+            unmasked = numpy.logical_not(self.masked)
+            w_ndr = narray(w, copy=False, subok=False, dtype=float_)
+            if w_ndr.ndim > 1 or w_ndr.size != self.nobs:
+                raise ValueError, "Invalid size of the 'weights' vector!"
+            self.w_ndr = w_ndr
+            self._base.weights = <double *>w_ndr[unmasked].data
+
+######---------------------------------------------------------------------------
+##---- ---- loess control ---
+######---------------------------------------------------------------------------
+cdef class loess_control:
+    """Loess control parameters.
+    
+:IVariables:
+    surface : string ["interpolate"]
+        Determines whether the fitted surface is computed directly at all points
+        ("direct") or whether an interpolation method is used ("interpolate").
+        The default ("interpolate") is what most users should use unless special 
+        circumstances warrant.
+    statistics : string ["approximate"]
+        Determines whether the statistical quantities are computed exactly 
+        ("exact") or approximately ("approximate"). "exact" should only be used 
+        for testing the approximation in statistical development and is not meant 
+        for routine usage because computation time can be horrendous.
+    trace_hat : string ["wait.to.decide"]
+        Determines how the trace of the hat matrix should be computed. The hat
+        matrix is used in the computation of the statistical quantities. 
+        If "exact", an exact computation is done; this could be slow when the
+        number of observations n becomes large. If "wait.to.decide" is selected, 
+        then a default is "exact" for n < 500 and "approximate" otherwise. 
+        This option is only useful when the fitted surface is interpolated. If  
+        surface is "exact", an exact computation is always done for the trace. 
+        Setting trace_hat to "approximate" for large dataset will substantially 
+        reduce the computation time.
+    iterations : integer
+        Number of iterations of the robust fitting method. If the family is 
+        "gaussian", the number of iterations is set to 0.
+    cell : integer
+        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),
+        where n is the number of observations, and span the smoothing parameter.
+        Then, a cell is further divided if the number of observations within it 
+        is greater than or equal to k. This option is only used if the surface 
+        is interpolated.
+    
+    """
+    cdef c_loess.c_loess_control *_base
+    #.........    
+    property surface:
+        """
+    surface : string ["interpolate"]
+        Determines whether the fitted surface is computed directly at all points
+        ("direct") or whether an interpolation method is used ("interpolate").
+        The default ("interpolate") is what most users should use unless special 
+        circumstances warrant.
+        """
+        def __get__(self):
+            return self._base.surface
+        def __set__(self, surface):
+            if surface.lower() not in ('interpolate', 'direct'):
+                raise ValueError("Invalid value for the 'surface' argument: "+
+                                 "should be in ('interpolate', 'direct').")
+            tmpx = surface.lower()
+            self._base.surface = tmpx
+    #.........
+    property statistics:
+        """
+    statistics : string ["approximate"]
+        Determines whether the statistical quantities are computed exactly 
+        ("exact") or approximately ("approximate"). "exact" should only be used 
+        for testing the approximation in statistical development and is not meant 
+        for routine usage because computation time can be horrendous.
+        """
+        def __get__(self):
+            return self._base.statistics
+        def __set__(self, statistics):
+            if statistics.lower() not in ('approximate', 'exact'):
+                raise ValueError("Invalid value for the 'statistics' argument: "\
+                                 "should be in ('approximate', 'exact').")
+            tmpx = statistics.lower()
+            self._base.statistics = tmpx
+    #.........
+    property trace_hat:
+        """
+    trace_hat : string ["wait.to.decide"]
+        Determines how the trace of the hat matrix should be computed. The hat
+        matrix is used in the computation of the statistical quantities. 
+        If "exact", an exact computation is done; this could be slow when the
+        number of observations n becomes large. If "wait.to.decide" is selected, 
+        then a default is "exact" for n < 500 and "approximate" otherwise. 
+        This option is only useful when the fitted surface is interpolated. If  
+        surface is "exact", an exact computation is always done for the trace. 
+        Setting trace_hat to "approximate" for large dataset will substantially 
+        reduce the computation time.
+        """
+        def __get__(self):
+            return self._base.trace_hat
+        def __set__(self, trace_hat):
+            if trace_hat.lower() not in ('approximate', 'exact'):
+                raise ValueError("Invalid value for the 'trace_hat' argument: "\
+                                 "should be in ('approximate', 'exact').")
+            tmpx = trace_hat.lower()
+            self._base.trace_hat = tmpx
+    #.........
+    property iterations:
+        """
+    iterations : integer
+        Number of iterations of the robust fitting method. If the family is 
+        "gaussian", the number of iterations is set to 0.
+        """
+        def __get__(self):
+            return self._base.iterations
+        def __set__(self, iterations):
+            if iterations < 0:
+                raise ValueError("Invalid number of iterations: should be positive")
+            self._base.iterations = iterations
+    #.........
+    property cell:
+        """
+    cell : integer
+        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),
+        where n is the number of observations, and span the smoothing parameter.
+        Then, a cell is further divided if the number of observations within it 
+        is greater than or equal to k. This option is only used if the surface 
+        is interpolated.
+        """     
+        def __get__(self):
+            return self._base.cell
+        def __set__(self, cell):
+            if cell <= 0:
+                raise ValueError("Invalid value for the cell argument: should be positive")
+            self._base.cell = cell
+    #.........
+    def update(self, **cellargs):
+        """Updates several parameters at once."""
+        surface = cellargs.get('surface', None)
+        if surface is not None:
+            self.surface = surface
+        #
+        statistics = cellargs.get('statistics', None)
+        if statistics is not None:
+            self.statistics = statistics
+        #    
+        trace_hat = cellargs.get('trace_hat', None)
+        if trace_hat is not None:
+            self.trace_hat = trace_hat
+        #
+        iterations = cellargs.get('iterations', None)
+        if iterations is not None:
+            self.iterations = iterations
+        #
+        cell = cellargs.get('cell', None)
+        if cell is not None:
+            self.parametric_flags = cell
+        #
+    #.........
+    def __str__(self):
+        strg = ["Control          :",
+                "Surface type     : %s" % self.surface,
+                "Statistics       : %s" % self.statistics,
+                "Trace estimation : %s" % self.trace_hat,
+                "Cell size        : %s" % self.cell,
+                "Nb iterations    : %s" % self.iterations,]
+        return '\n'.join(strg)
+        
+#    
+######---------------------------------------------------------------------------
+##---- ---- loess kd_tree ---
+######---------------------------------------------------------------------------
+cdef class loess_kd_tree:
+    cdef c_loess.c_loess_kd_tree *_base
+
+######---------------------------------------------------------------------------
+##---- ---- loess model ---
+######---------------------------------------------------------------------------
+cdef class loess_model:
+    """loess_model contains parameters required for a loess fit.
+    
+:IVariables:
+    normalize : boolean [True]
+        Determines whether the independent variables should be normalized.  
+        If True, the normalization is performed by setting the 10% trimmed 
+        standard deviation to one. If False, no normalization is carried out. 
+        This option is only useful for more than one variable. For spatial
+        coordinates predictors or variables with a common scale, it should be 
+        set to False.
+    span : float [0.75]
+        Smoothing factor, as a fraction of the number of points to take into
+        account. 
+    degree : integer [2]
+        Overall degree of locally-fitted polynomial. 1 is locally-linear 
+        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.
+    family : string ["gaussian"]
+        Determines the assumed distribution of the errors. The values are 
+        "gaussian" or "symmetric". If "gaussian" is selected, the fit is 
+        performed with least-squares. If "symmetric" is selected, the fit
+        is performed robustly by redescending M-estimators.
+    parametric_flags : sequence [ [False]*p ]
+        Indicates which independent variables should be conditionally-parametric
+        (if there are two or more independent variables). The argument should be
+        a sequence of booleans, with the same size as the number of independent 
+        variables, specified in the order of the predictor group ordered in x. 
+        Note: elements of the sequence cannot be modified individually: the whole
+        sequence must be given.
+    drop_square : sequence [ [False]* p]
+        When there are two or more independent variables and when a 2nd order
+        polynomial is used, "drop_square_flags" specifies those numeric predictors 
+        whose squares should be dropped from the set of fitting variables. 
+        The method of specification is the same as for parametric.  
+        Note: elements of the sequence cannot be modified individually: the whole
+        sequence must be given.
+
+    """
+        
+    cdef c_loess.c_loess_model *_base
+    cdef long npar
+    #.........
+    cdef setup(self, c_loess.c_loess_model *base, long npar):
+        self._base = base
+        self.npar = npar
+        return self    
+    #.........
+    property normalize:
+        def __get__(self):
+            return bool(self._base.normalize)
+        def __set__(self, normalize):
+            self._base.normalize = normalize
+    #.........
+    property span:
+        def __get__(self):
+            return self._base.span
+        def __set__(self, span):
+            if span <= 0. or span > 1.:
+                raise ValueError("Span should be between 0 and 1!")
+            self._base.span = span
+    #.........
+    property degree:
+        def __get__(self):
+            return self._base.degree
+        def __set__(self, degree):
+            if degree < 0 or degree > 2:
+                raise ValueError("Degree should be between 0 and 2!")
+            self._base.degree = degree
+    #.........
+    property family:
+        def __get__(self):
+            return self._base.family
+        def __set__(self, family):
+            if family.lower() not in ('symmetric', 'gaussian'):
+                raise ValueError("Invalid value for the 'family' argument: "\
+                                 "should be in ('symmetric', 'gaussian').")
+            self._base.family = family
+    #.........
+    property parametric_flags:
+        def __get__(self):
+            return boolarray_from_data(self.npar, 1, self._base.parametric)
+        def __set__(self, paramf):
+            cdef ndarray p_ndr
+            cdef int i
+            p_ndr = numpy.atleast_1d(narray(paramf, copy=False, subok=True, 
+                                            dtype=numpy.bool))
+            for i from 0 <= i < min(self.npar, p_ndr.size):
+                self._base.parametric[i] = p_ndr[i]
+    #.........
+    property drop_square_flags:
+        def __get__(self):
+            return boolarray_from_data(self.npar, 1, self._base.drop_square)
+        def __set__(self, drop_sq):
+            cdef ndarray d_ndr
+            cdef int i
+            d_ndr = numpy.atleast_1d(narray(drop_sq, copy=False, subok=True, 
+                                            dtype=numpy.bool))
+            for i from 0 <= i < min(self.npar, d_ndr.size):
+                self._base.drop_square[i] = d_ndr[i]
+    #........
+    def update(self, **modelargs):
+        family = modelargs.get('family', None)
+        if family is not None:
+            self.family = family
+        #
+        span = modelargs.get('span', None)
+        if span is not None:
+            self.span = span
+        #    
+        degree = modelargs.get('degree', None)
+        if degree is not None:
+            self.degree = degree
+        #
+        normalize = modelargs.get('normalize', None)
+        if normalize is not None:
+            self.normalize = normalize
+        #
+        parametric = modelargs.get('parametric', None)
+        if parametric is not None:
+            self.parametric_flags = parametric
+        #
+        drop_square = modelargs.get('drop_square', None)
+        if drop_square is not None:
+            self.drop_square_flags = drop_square
+    #.........
+    def __repr__(self):
+        return "<loess object: model parameters>"
+    #.........
+    def __str__(self):
+        strg = ["Model parameters.....",
+                "Family          : %s" % self.family,
+                "Span            : %s" % self.span,
+                "Degree          : %s" % self.degree,
+                "Normalized      : %s" % self.normalize,
+                "Parametric      : %s" % self.parametric_flags[:self.npar],
+                "Drop_square     : %s" % self.drop_square_flags[:self.npar]
+                ]
+        return '\n'.join(strg)
+        
+#####---------------------------------------------------------------------------
+#---- ---- loess outputs ---
+#####---------------------------------------------------------------------------
+cdef class loess_outputs:
+    """Outputs of a loess fit. This object is automatically created with empty
+values when a new loess object is instantiated. The object gets filled when the 
+loess.fit() method is called.
+    
+:IVariables:
+    fitted_values : ndarray
+        The (n,) ndarray of fitted values.
+    fitted_residuals : ndarray
+        The (n,) ndarray of fitted residuals (observations - fitted values).
+    enp : float
+        Equivalent number of parameters.
+    s : float
+        Estimate of the scale of residuals.
+    one_delta: float
+        Statistical parameter used in the computation of standard errors.
+    two_delta : float
+        Statistical parameter used in the computation of standard errors.
+    pseudovalues : ndarray
+        The (n,) ndarray of adjusted values of the response when robust estimation 
+        is used.
+    trace_hat : float    
+        Trace of the operator hat matrix.
+    diagonal : ndarray
+        Diagonal of the operator hat matrix.
+    robust : ndarray
+        The (n,) ndarray of robustness weights for robust fitting.
+    divisor : ndarray
+        The (p,) array of normalization divisors for numeric predictors.
+    """
+    cdef c_loess.c_loess_outputs *_base
+    cdef long nobs, nobs_eff, npar
+    cdef ndarray masked, unmasked
+    cdef readonly int activated, ismasked
+    #
+    cdef setup(self,c_loess.c_loess_outputs *base, 
+               long nobs, long nobs_eff, long npar, ndarray mask):
+        self._base = base
+        self.nobs = nobs
+        self.nobs_eff = nobs_eff
+        self.npar = npar
+        self.masked = mask
+        self.unmasked = numpy.logical_not(mask)
+        self.activated = False
+        self.ismasked = mask.any()
+    #........
+    cdef ndarray getoutput(self, double *data):
+        cdef ndarray out_ndr, tmp_ndr
+        tmp_ndr = floatarray_from_data(self.nobs_eff, 1, data)
+        if not self.ismasked:
+            return tmp_ndr
+        out_ndr = marray(numpy.empty((self.nobs,), float_), mask=self.masked)
+        out_ndr[self.unmasked] = tmp_ndr.flat
+        return out_ndr
+    #........
+    property fitted_values:    
+        def __get__(self):
+            return self.getoutput(self._base.fitted_values)
+    #.........
+    property fitted_residuals:
+        def __get__(self):
+            return self.getoutput(self._base.fitted_residuals)
+    #.........
+    property pseudovalues:
+        def __get__(self):
+            return self.getoutput(self._base.pseudovalues)
+    #.........
+    property diagonal:
+        def __get__(self):
+            return self.getoutput(self._base.diagonal)
+    #.........
+    property robust:
+        def __get__(self):
+            return self.getoutput(self._base.robust)
+    #.........
+    property divisor:
+        def __get__(self):
+            return floatarray_from_data(self.npar, 1, self._base.divisor)
+    #.........    
+    property enp:
+        def __get__(self):
+            return self._base.enp
+    #.........
+    property s:
+        def __get__(self):
+            return self._base.s
+    #.........
+    property one_delta:
+        def __get__(self):
+            return self._base.one_delta 
+    #.........
+    property two_delta:
+        def __get__(self):
+            return self._base.two_delta
+    #.........
+    property trace_hat:
+        def __get__(self):
+            return self._base.trace_hat
+    #.........
+    def __str__(self):
+        strg = ["Outputs................",
+                "Fitted values         : %s\n" % self.fitted_values,
+                "Fitted residuals      : %s\n" % self.fitted_residuals,
+                "Eqv. nb of parameters : %s" % self.enp,
+                "Residual error        : %s" % self.s,
+                "Deltas                : %s - %s" % (self.one_delta, self.two_delta),
+                "Normalization factors : %s" % self.divisor,]
+        return '\n'.join(strg)
+
+
+        
+#####---------------------------------------------------------------------------
+#---- ---- loess confidence ---
+#####---------------------------------------------------------------------------
+cdef class conf_intervals:
+    """Pointwise confidence intervals of a loess-predicted object:
+    
+:IVariables:
+    fit : ndarray
+        Predicted values.
+    lower : ndarray
+        Lower bounds of the confidence intervals.
+    upper : ndarray
+        Upper bounds of the confidence intervals.
+    """
+    cdef c_loess.c_conf_inv _base
+    cdef readonly ndarray lower, fit, upper
+    #.........
+    def __dealloc__(self):
+        c_loess.pw_free_mem(&self._base)
+    #.........
+    cdef setup(self, c_loess.c_conf_inv base, long nest):
+        self._base = base
+        self.fit = floatarray_from_data(nest, 1, base.fit)
+        self.upper = floatarray_from_data(nest, 1, base.upper)
+        self.lower = floatarray_from_data(nest, 1, base.lower)
+    #.........
+    def __str__(self):
+        cdef ndarray tmp_ndr
+        tmp_ndr = numpy.r_[[self.lower,self.fit,self.upper]].T
+        return "Confidence intervals....\nLower b./ fit / upper b.\n%s" % \
+               tmp_ndr 
+
+#####---------------------------------------------------------------------------
+#---- ---- loess predictions ---
+#####---------------------------------------------------------------------------
+cdef class loess_predicted:
+    """Predicted values and standard errors of a loess object
+
+:IVariables:
+    values : ndarray
+        The (m,) ndarray of loess values evaluated at newdata
+    stderr : ndarray
+        The (m,) ndarray of the estimates of the standard error on the estimated
+        values.
+    residual_scale : float
+        Estimate of the scale of the residuals
+    df : integer
+        Degrees of freedom of the t-distribution used to compute pointwise 
+        confidence intervals for the evaluated surface.
+    nest : integer
+        Number of new observations.
+    """
+        
+    cdef c_loess.c_prediction _base
+    cdef readonly long nest
+    cdef readonly conf_intervals confidence_intervals
+    #.........
+    def __dealloc__(self):
+        c_loess.pred_free_mem(&self._base)      
+    #.........
+    cdef setup(self, c_loess.c_prediction base, long nest):
+        self._base = base
+        self.nest = nest
+    #.........
+    property values:
+        def __get__(self):
+            return floatarray_from_data(self.nest, 1, self._base.fit)
+    #.........
+    property stderr:
+        def __get__(self):
+            return floatarray_from_data(self.nest, 1, self._base.se_fit)
+    #.........
+    property residual_scale:
+        def __get__(self):
+            return self._base.residual_scale
+    #.........
+    property df:
+        def __get__(self):
+            return self._base.df        
+    #.........
+    def confidence(self, coverage=0.95):
+        """Returns the pointwise confidence intervals for each predicted values,
+at the given confidence interval coverage.
+        
+:Parameters:
+    coverage : float
+        Confidence level of the confidence intervals limits, as a fraction.
+        
+:Returns:
+    A new conf_intervals object, consisting of:
+    fit : ndarray
+        Predicted values.
+    lower : ndarray
+        Lower bounds of the confidence intervals.
+    upper : ndarray
+        Upper bounds of the confidence intervals.
+        """
+        cdef c_loess.c_conf_inv _confintv
+        if coverage < 0.5:
+            coverage = 1. - coverage 
+        if coverage > 1. :
+            raise ValueError("The coverage precentage should be between 0 and 1!")
+        c_loess.c_pointwise(&self._base, self.nest, coverage, &_confintv)
+        self.confidence_intervals = conf_intervals()
+        self.confidence_intervals.setup(_confintv, self.nest)
+        return self.confidence_intervals
+    #.........
+    def __str__(self):
+        strg = ["Outputs................",
+                "Predicted values      : %s\n" % self.values,
+                "Predicted std error   : %s\n" % self.stderr,
+                "Residual scale        : %s" % self.residual_scale,
+                "Degrees of freedom    : %s" % self.df,
+#                "Confidence intervals  : %s" % self.confidence,
+                ]
+        return '\n'.join(strg)
+    
+
+#####---------------------------------------------------------------------------
+#---- ---- loess base class ---
+#####---------------------------------------------------------------------------
+cdef class loess:
+    """
+    
+:Keywords:
+    x : ndarray
+        A (n,p) ndarray of independent variables, with n the number of observations
+        and p the number of variables.
+    y : ndarray
+        A (n,) ndarray of observations
+    weights : ndarray
+        A (n,) ndarray of weights to be given to individual observations in the 
+        sum of squared residuals that forms the local fitting criterion. If not
+        None, the weights should be non negative. If the different observations
+        have non-equal variances, the weights should be inversely proportional 
+        to the variances.
+        By default, an unweighted fit is carried out (all the weights are one).
+    surface : string ["interpolate"]
+        Determines whether the fitted surface is computed directly at all points
+        ("direct") or whether an interpolation method is used ("interpolate").
+        The default ("interpolate") is what most users should use unless special 
+        circumstances warrant.
+    statistics : string ["approximate"]
+        Determines whether the statistical quantities are computed exactly 
+        ("exact") or approximately ("approximate"). "exact" should only be used 
+        for testing the approximation in statistical development and is not meant 
+        for routine usage because computation time can be horrendous.
+    trace_hat : string ["wait.to.decide"]
+        Determines how the trace of the hat matrix should be computed. The hat
+        matrix is used in the computation of the statistical quantities. 
+        If "exact", an exact computation is done; this could be slow when the
+        number of observations n becomes large. If "wait.to.decide" is selected, 
+        then a default is "exact" for n < 500 and "approximate" otherwise. 
+        This option is only useful when the fitted surface is interpolated. If  
+        surface is "exact", an exact computation is always done for the trace. 
+        Setting trace_hat to "approximate" for large dataset will substantially 
+        reduce the computation time.
+    iterations : integer
+        Number of iterations of the robust fitting method. If the family is 
+        "gaussian", the number of iterations is set to 0.
+    cell : integer
+        Maximum cell size of the kd-tree. Suppose k = floor(n*cell*span),
+        where n is the number of observations, and span the smoothing parameter.
+        Then, a cell is further divided if the number of observations within it 
+        is greater than or equal to k. This option is only used if the surface 
+        is interpolated.
+    span : float [0.75]
+        Smoothing factor, as a fraction of the number of points to take into
+        account. 
+    degree : integer [2]
+        Overall degree of locally-fitted polynomial. 1 is locally-linear 
+        fitting and 2 is locally-quadratic fitting.  Degree should be 2 at most.
+    normalize : boolean [True]
+        Determines whether the independent variables should be normalized.  
+        If True, the normalization is performed by setting the 10% trimmed 
+        standard deviation to one. If False, no normalization is carried out. 
+        This option is only useful for more than one variable. For spatial
+        coordinates predictors or variables with a common scale, it should be 
+        set to False.
+    family : string ["gaussian"]
+        Determines the assumed distribution of the errors. The values are 
+        "gaussian" or "symmetric". If "gaussian" is selected, the fit is 
+        performed with least-squares. If "symmetric" is selected, the fit
+        is performed robustly by redescending M-estimators.
+    parametric_flags : sequence [ [False]*p ]
+        Indicates which independent variables should be conditionally-parametric
+       (if there are two or more independent variables). The argument should 
+       be a sequence of booleans, with the same size as the number of independent 
+       variables, specified in the order of the predictor group ordered in x. 
+    drop_square : sequence [ [False]* p]
+        When there are two or more independent variables and when a 2nd order
+        polynomial is used, "drop_square_flags" specifies those numeric predictors 
+        whose squares should be dropped from the set of fitting variables. 
+        The method of specification is the same as for parametric.  
+        
+:Outputs:
+    fitted_values : ndarray
+        The (n,) ndarray of fitted values.
+    fitted_residuals : ndarray
+        The (n,) ndarray of fitted residuals (observations - fitted values).
+    enp : float
+        Equivalent number of parameters.
+    s : float
+        Estimate of the scale of residuals.
+    one_delta: float
+        Statistical parameter used in the computation of standard errors.
+    two_delta : float
+        Statistical parameter used in the computation of standard errors.
+    pseudovalues : ndarray
+        The (n,) ndarray of adjusted values of the response when robust estimation 
+        is used.
+    trace_hat : float    
+        Trace of the operator hat matrix.
+    diagonal :
+        Diagonal of the operator hat matrix.
+    robust : ndarray
+        The (n,) ndarray of robustness weights for robust fitting.
+    divisor : ndarray
+        The (p,) array of normalization divisors for numeric predictors.
+
+    """
+    cdef c_loess.c_loess _base
+    cdef readonly loess_inputs inputs
+    cdef readonly loess_model model
+    cdef readonly loess_control control
+    cdef readonly loess_kd_tree kd_tree
+    cdef readonly loess_outputs outputs
+    cdef readonly loess_predicted predicted
+    cdef public long nobs, npar
+    
+    def __init__(self, object x, object y, object weights=None, **options):
+        #
+        cdef ndarray x_ndr, y_ndr, m_ndr
+        cdef double *x_dat, *y_dat
+        cdef int i
+        # Initialize the inputs .......
+        self.inputs = loess_inputs(x, y)
+        x_dat = <double *>self.inputs.x_eff.data
+        y_dat = <double *>self.inputs.y_eff.data
+        n = self.inputs.nobs_eff
+        p = self.inputs.npar
+        c_loess.loess_setup(x_dat, y_dat, n, p, &self._base)
+        # Sets the _base input .........
+        self.inputs._base = &self._base.inputs
+        # Initialize the model parameters
+        self.model = loess_model()
+        self.model.setup(&self._base.model, p)
+        # Initialize the control parameters
+        self.control = loess_control()
+        self.control._base = &self._base.control
+        # Initialize the kd tree ......
+        self.kd_tree = loess_kd_tree()
+        self.kd_tree._base = &self._base.kd_tree
+        # Initialize the outputs ......
+        self.outputs = loess_outputs()
+        self.outputs.setup(&self._base.outputs,
+                           self.inputs.nobs, n, p, self.inputs.masked)
+        # Process options .............
+        modelopt = {}
+        controlopt = {}
+        for (k,v) in options.iteritems():
+            if k in ('family', 'span', 'degree', 'normalize', 
+                     'parametric', 'drop_square',):
+                modelopt[k] = v
+            elif k in ('surface', 'statistics', 'trace_hat', 
+                       'iterations', 'cell'):
+                controlopt[k] = v
+        self.control.update(**controlopt)
+        self.model.update(**modelopt)
+    #......................................................
+    def fit(self):
+        """Computes the loess parameters on the current inputs and sets of parameters."""
+        c_loess.loess_fit(&self._base)
+        self.outputs.activated = True
+        if self._base.status.err_status:
+            raise ValueError(self._base.status.err_msg)
+        return
+    #......................................................
+    def inputs_summary(self):
+        """Returns some generic information about the loess parameters.
+        """
+        toprint = [str(self.inputs), str(self.model), str(self.control)]
+        return "\n".join(toprint)
+        
+    def outputs_summary(self):
+        """Returns some generic information about the loess fit."""
+        print "Number of Observations         : %d" % self.inputs.nobs
+        print "Fit flag                       : %d" % bool(self.outputs.activated)
+        print "Equivalent Number of Parameters: %.1f" % self.outputs.enp
+        if self.model.family == "gaussian":
+            print "Residual Standard Error        : %.4f" % self.outputs.s
+        else:
+            print "Residual Scale Estimate        : %.4f" % self.outputs.s
+    #......................................................
+    def predict(self, newdata, stderror=False):
+        """Computes loess estimates at the given new data points newdata. Returns
+a loess_predicted object, whose attributes are described below.
+        
+:Parameters:
+    newdata : ndarray
+        The (m,p) array of independent variables where the surface must be estimated,
+        with m the number of new data points, and p the number of independent
+        variables.
+    stderror : boolean
+        Whether the standard error should be computed
+        
+:Returns:
+    A new loess_predicted object, consisting of:
+    values : ndarray
+        The (m,) ndarray of loess values evaluated at newdata
+    stderr : ndarray
+        The (m,) ndarray of the estimates of the standard error on the estimated
+        values.
+    residual_scale : float
+        Estimate of the scale of the residuals
+    df : integer
+        Degrees of freedom of the t-distribution used to compute pointwise 
+        confidence intervals for the evaluated surface.
+    nest : integer
+        Number of new observations.
+        """
+        cdef ndarray p_ndr
+        cdef double *p_dat
+        cdef c_loess.c_prediction _prediction
+        cdef int i, m
+        # Make sure there's been a fit earlier ...
+        if self.outputs.activated == 0:
+            c_loess.loess_fit(&self._base)
+            self.outputs.activated = True
+            if self._base.status.err_status:
+                raise ValueError(self._base.status.err_msg)
+        # Note : we need a copy as we may have to normalize
+        p_ndr = narray(newdata, copy=True, subok=True, order='C').ravel()
+        p_dat = <double *>p_ndr.data
+        # Test the compatibility of sizes .......
+        if p_ndr.size == 0:
+            raise ValueError("Can't predict without input data !")
+        (m, notOK) = divmod(len(p_ndr), self.inputs.npar)
+        if notOK:
+            raise ValueError(
+                  "Incompatible data size: there should be as many rows as parameters")
+        #.....
+        c_loess.c_predict(p_dat, m, &self._base, &_prediction, stderror)
+        if self._base.status.err_status:
+            raise ValueError(self._base.status.err_msg)
+        self.predicted = loess_predicted()
+        self.predicted._base = _prediction
+        self.predicted.nest = m
+#        self.predicted.setup(_prediction, m)
+        return self.predicted
+    #.........
+    def __dealloc__(self):
+        c_loess.loess_free_mem(&self._base)
+    #......................................................
+    
+
+#####---------------------------------------------------------------------------
+#---- ---- loess anova ---
+#####---------------------------------------------------------------------------
+cdef class anova:
+    cdef readonly double dfn, dfd, F_value, Pr_F
+    #
+    def __init__(self, loess_one, loess_two):
+        cdef double one_d1, one_d2, one_s, two_d1, two_d2, two_s, rssdiff,\
+                    d1diff, tmp, df1, df2
+        #
+        if not isinstance(loess_one, loess) or not isinstance(loess_two, loess):
+            raise ValueError("Arguments should be valid loess objects!"\
+                             "got '%s' instead" % type(loess_one))
+        #
+        out_one = loess_one.outputs
+        out_two = loess_two.outputs
+        #
+        one_d1 = out_one.one_delta
+        one_d2 = out_one.two_delta
+        one_s = out_one.s
+        #
+        two_d1 = out_two.one_delta
+        two_d2 = out_two.two_delta
+        two_s = out_two.s
+        #
+        rssdiff = abs(one_s * one_s * one_d1 - two_s * two_s * two_d1)
+        d1diff = abs(one_d1 - two_d1)
+        self.dfn = d1diff * d1diff / abs(one_d2 - two_d2)
+        df1 = self.dfn
+        #
+        if out_one.enp > out_two.enp:
+            self.dfd = one_d1 * one_d1 / one_d2
+            tmp = one_s
+        else:
+            self.dfd = two_d1 * two_d1 / two_d2
+            tmp = two_s
+        df2 = self.dfd
+        F_value = (rssdiff / d1diff) / (tmp * tmp)
+        
+        self.Pr_F = 1. - c_loess.ibeta(F_value*df1/(df2+F_value*df1), df1/2, df2/2)
+        self.F_value = F_value
+
+        
\ No newline at end of file

Modified: trunk/Lib/sandbox/pyloess/src/c_python.pxd
===================================================================
--- trunk/Lib/sandbox/pyloess/src/c_python.pxd	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/src/c_python.pxd	2007-03-27 06:38:36 UTC (rev 2874)
@@ -20,3 +20,5 @@
     void   Py_CLEAR(object o) # use instead of decref
     
     object PyList_New(int size)
+    object PyCObject_FromVoidPtr(void *, void (*)(void *))
+    void *PyCObject_AsVoidPtr(object)

Added: trunk/Lib/sandbox/pyloess/tests/test_mpyloess.py
===================================================================
--- trunk/Lib/sandbox/pyloess/tests/test_mpyloess.py	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/tests/test_mpyloess.py	2007-03-27 06:38:36 UTC (rev 2874)
@@ -0,0 +1,439 @@
+"""
+Test series for lowess, stl and loess routines.
+
+:author: Pierre GF Gerard-Marchant
+:contact: pierregm_at_uga_edu
+:date: $Date$
+:version: $Id$
+"""
+__author__ = "Pierre GF Gerard-Marchant ($Author$)"
+__version__ = '1.0'
+__revision__ = "$Revision$"
+__date__     = '$Date$'
+
+import os
+
+import numpy
+from numpy import bool_, complex_, float_, int_, str_, object_
+import numpy.core.numeric as numeric
+fromiter = numpy.fromiter
+
+import maskedarray
+marray = maskedarray.masked_array
+masked_values = maskedarray.masked_values
+
+from numpy.testing import NumpyTest, NumpyTestCase
+from maskedarray.testutils import build_err_msg, \
+        assert_equal, assert_almost_equal
+        
+
+import mpyloess
+reload(mpyloess)
+from mpyloess import lowess, stl, loess, loess_anova
+
+#####---------------------------------------------------------------------------
+#---- --- LOWESS ---
+#####---------------------------------------------------------------------------
+class test_lowess(NumpyTestCase):
+    "Test class for lowess."
+    #
+    def __init__(self, *args, **kwds):
+        NumpyTestCase.__init__(self, *args, **kwds)
+        X = marray([ 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8,10,12,14,50])
+        Y = marray([18, 2,15, 6,10, 4,16,11, 7, 3,14,17,20,12, 9,13, 1, 8, 5,19])
+        idx = X.argsort()
+        self.data = (X[idx], Y[idx])
+    #............................................
+    def test_lowess_1(self):
+        "Tests lowess on typical data. part #1."
+        (X, Y) = self.data
+        YS = [13.659,11.145, 8.701, 9.722,10.000,11.300,11.300,11.300,
+              11.300,11.300,11.300,11.300,11.300,11.300,11.300,13.000, 
+              6.440, 5.596,  5.456,18.998]
+        Z = lowess(X, Y, span=0.25, nsteps=0, delta=0)
+        assert_almost_equal(Z.outputs.fitted_values, YS, decimal=3)
+        assert_almost_equal(Z.outputs.fitted_residuals+Z.outputs.fitted_values, 
+                            Z.inputs.y, decimal=3)
+    #............................................
+    def test_lowess_2(self):
+        "Tests lowess on typical data. part #2."
+        (X, Y) = self.data
+        YS = [13.659,12.347,11.034, 9.722,10.511,11.300,11.300,11.300,
+              11.300,11.300,11.300,11.300,11.300,11.300,11.300,13.000, 
+               6.440, 5.596, 5.456,18.998]
+        Z = lowess(X, Y, span=0.25, nsteps=0, delta=3)
+        assert_almost_equal(Z.outputs.fitted_values, YS, decimal=3)
+        assert_almost_equal(Z.outputs.fitted_residuals+Z.outputs.fitted_values, 
+                            Z.inputs.y, decimal=3)        
+    #............................................
+    def test_lowess_3(self):
+        "Tests lowess on typical data. part #3."
+        (X, Y) = self.data
+        YS = [14.811,12.115, 8.984, 9.676,10.000,11.346,11.346,11.346,
+              11.346,11.346,11.346,11.346,11.346,11.346,11.346,13.000, 
+               6.734, 5.744, 5.415,18.998 ]
+        Z = lowess(X, Y, span=0.25, nsteps=2, delta=0)
+        assert_almost_equal(Z.outputs.fitted_values, YS, decimal=3)
+        assert_almost_equal(Z.outputs.fitted_residuals+Z.outputs.fitted_values, 
+                            Z.inputs.y, decimal=3)            
+    #............................................
+    def test_lowess_4(self):
+        "Tests lowess on masked data."
+        X = masked_values([ 1, 2, 3, 4, 5,-999, 6,   6, 6, 6, -999,-999, 
+                            6, 6, 6, 6, 6,   6, 8,-999,10,12,14,50,-999],-999)
+        Y = marray([18, 2,15, 6,10,-999, 4,  16,11, 7, -999,-999,
+                     3,14,17,20,12,   9,13,-999, 1, 8, 5,19,-999])
+        YS = [14.811,12.115, 8.984, 9.676,10.000,11.346,11.346,11.346,
+              11.346,11.346,11.346,11.346,11.346,11.346,11.346,13.000, 
+               6.734, 5.744, 5.415,18.998 ]
+        Z = lowess(X, Y, span=0.25, nsteps=2, delta=0)
+        assert_almost_equal(Z.outputs.fitted_values.compressed(), YS, decimal=3)
+        assert_almost_equal(Z.outputs.fitted_residuals + Z.outputs.fitted_values, 
+                            Z.inputs.y, decimal=3)
+#     
+
+#####---------------------------------------------------------------------------
+#---- --- STL ---
+#####---------------------------------------------------------------------------
+class test_stl(NumpyTestCase):
+    "Tests STL."
+    #
+    def __init__(self, *args, **kwds):
+        NumpyTestCase.__init__(self, *args, **kwds)
+        # Get CO2 data ................    
+        filename = os.path.join('tests','co2_data')
+        F = open(filename, 'r')
+        data = []
+        for line in F.readlines():
+            data.append([float(x) for x in line.rstrip().split()])
+        co2_data = numpy.concatenate(data)
+        # Get CO2 results .............
+        filename = os.path.join('tests','co2_results_double')
+        F = open(filename, 'r')
+        co2_results = []
+        for line in F.readlines():
+            co2_results.append(fromiter((float(x) for x in line.rstrip().split()),
+                                        float_))        
+        #
+        parameters = dict(np=12, ns=35, nt=19, nl=13, no=2, ni=1,
+                          nsjump=4, ntjump=2, nljump=2,
+                          isdeg=1, itdeg=1, ildeg=1)
+        self.d = (co2_data, co2_results, parameters)
+    #............................................
+    def test_stl_1(self):
+        "Tests a classic STL."
+        (co2_data, co2_results, parameters) = self.d
+        co2_fitted = stl(co2_data, robust=False, **parameters).outputs
+        assert_almost_equal(co2_fitted.seasonal, co2_results[0], 6)
+        assert_almost_equal(co2_fitted.trend, co2_results[1], 6)
+        assert_almost_equal(co2_fitted.weights, co2_results[2], 6)
+    #............................................
+    def test_stl_2(self):
+        "Tests a robust STL."
+        (co2_data, co2_results, parameters) = self.d
+        co2_fitted = stl(co2_data, robust=True, **parameters).outputs
+        assert_almost_equal(co2_fitted.seasonal, co2_results[4], 6)
+        assert_almost_equal(co2_fitted.trend, co2_results[5], 6)
+        assert_almost_equal(co2_fitted.weights, co2_results[6], 6)
+
+
+#####---------------------------------------------------------------------------
+#---- --- LOESS ---
+#####---------------------------------------------------------------------------
+
+class test_loess2d(NumpyTestCase):
+    "Test class for lowess."
+    #
+    def __init__(self, *args, **kwds):
+        NumpyTestCase.__init__(self, *args, **kwds)
+        dfile = open(os.path.join('tests','madeup_data'), 'r')
+        dfile.readline()
+        x = fromiter((float(v) for v in dfile.readline().rstrip().split()),
+                     float_).reshape(-1,2)
+        x = marray(x) 
+        dfile.readline()
+        y = fromiter((float(v) for v in dfile.readline().rstrip().split()),
+                     float_)
+        y = marray(y)
+        #
+        rfile = open(os.path.join('tests','madeup_result'), 'r')
+        results = []
+        for i in range(8):
+            rfile.readline()
+            z = fromiter((float(v) for v in rfile.readline().rstrip().split()),
+                         float_)
+            results.append(z)
+        #
+        newdata1 = numpy.array([[-2.5, 0.0, 2.5], [0., 0., 0.]])
+        newdata2 = numpy.array([[-0.5, 0.5], [0., 0.]])
+        #
+        madeup = loess(x,y)
+        self.d = (x, y, results, newdata1, newdata2, madeup)
+    #
+    def test_2dbasic(self):
+        "2D standard"
+        (x, y, results, _, _, madeup) = self.d
+        madeup = loess(x,y)
+        madeup.model.span = 0.5
+        madeup.model.normalize = True
+        madeup.fit()
+        assert_almost_equal(madeup.outputs.fitted_values, results[0], 5)
+        assert_almost_equal(madeup.outputs.enp, 14.9, 1)
+        assert_almost_equal(madeup.outputs.s, 0.9693, 4)
+    #
+#    def test_2d_modflags_ez(self):
+#        "2D - modification of model flags"
+#        (x, y, results, newdata1, newdata2, madeup) = self.d
+#        madeup = cloess.loess(x,y)
+#        madeup.model.span = 0.8
+#        madeup.model.drop_square_flags[0] = True
+#        madeup.model.parametric_flags[0] = True
+#        assert_equal(madeup.model.parametric_flags[:2],[1,0])
+#        madeup.fit()        
+#        assert_almost_equal(madeup.outputs.fitted_values, results[1], 5)
+#        assert_almost_equal(madeup.outputs.enp, 6.9, 1)
+#        assert_almost_equal(madeup.outputs.s, 1.4804, 4)
+    #
+    def test_2d_modflags_tot(self):
+        "2D - modification of model flags"
+        (x, y, results, _, _, madeup) = self.d
+        madeup = loess(x,y)
+        madeup.model.span = 0.8
+        madeup.model.drop_square_flags = [True, False]
+        madeup.model.parametric_flags = [True, False]
+        assert_equal(madeup.model.parametric_flags[:2],[1,0])
+        madeup.fit()        
+        assert_almost_equal(madeup.outputs.fitted_values, results[1], 5)
+        assert_almost_equal(madeup.outputs.enp, 6.9, 1)
+        assert_almost_equal(madeup.outputs.s, 1.4804, 4)
+    #
+    def test_2d_modfamily(self):
+        "2D - family modification"
+        (_, _, results, _, _, madeup) = self.d
+        madeup.model.span = 0.8
+        madeup.model.drop_square_flags = [True, False]
+        madeup.model.parametric_flags = [True, False]
+        madeup.model.family = "symmetric"
+        madeup.fit()
+        assert_almost_equal(madeup.outputs.fitted_values, results[2], 5)
+        assert_almost_equal(madeup.outputs.enp, 6.9, 1)
+        assert_almost_equal(madeup.outputs.s, 1.0868, 4)
+    #
+    def test_2d_modnormalize(self):
+        "2D - normalization modification"
+        (_, _, results, _, _, madeup) = self.d
+        madeup.model.span = 0.8
+        madeup.model.drop_square_flags = [True, False]
+        madeup.model.parametric_flags = [True, False]
+        madeup.model.family = "symmetric"
+        madeup.model.normalize = False
+        madeup.fit()
+        assert_almost_equal(madeup.outputs.fitted_values, results[3], 5)
+        assert_almost_equal(madeup.outputs.enp, 6.9, 1)
+        assert_almost_equal(madeup.outputs.s, 1.0868, 4)
+    #
+    def test_2d_pred_nostderr(self):
+        "2D prediction - no stderr"
+        (_, _, results, newdata1, _, madeup) = self.d
+        madeup.model.span = 0.5
+        madeup.model.normalize = True
+        madeup.predict(newdata1, stderror=False)
+        assert_almost_equal(madeup.predicted.values, results[4], 5)
+        #
+        madeup_pred = madeup.predict(newdata1, stderror=False)
+        assert_almost_equal(madeup_pred.values, results[4], 5)
+    #
+    def test_2d_pred_nodata(self):
+        "2D prediction - nodata"
+        (_, _, _, _, _, madeup) = self.d
+        try:
+            madeup.predict(None)
+        except ValueError:
+            pass
+        else:
+            raise AssertionError,"The test should have failed"   
+    #
+    def test_2d_pred_stderr(self):
+        "2D prediction - w/ stderr"
+        (_, _, results, _, newdata2, madeup) = self.d   
+        madeup.model.span = 0.5
+        madeup.model.normalize = True
+        madeup_pred = madeup.predict(newdata2, stderror=True)
+        assert_almost_equal(madeup_pred.values, results[5], 5)
+        assert_almost_equal(madeup_pred.stderr, [0.276746, 0.278009], 5)
+        assert_almost_equal(madeup_pred.residual_scale, 0.969302, 6)
+        assert_almost_equal(madeup_pred.df, 81.2319, 4)
+        # Direct access
+        madeup.predict(newdata2, stderror=True)
+        assert_almost_equal(madeup.predicted.values, results[5], 5)
+        assert_almost_equal(madeup.predicted.stderr, [0.276746, 0.278009], 5)
+        assert_almost_equal(madeup.predicted.residual_scale, 0.969302, 6)
+        assert_almost_equal(madeup.predicted.df, 81.2319, 4)
+    #
+    def test_2d_pred_confinv(self):
+        "2D prediction - confidence"
+        (_, _, results, _, newdata2, madeup) = self.d   
+        madeup.model.span = 0.5
+        madeup.model.normalize = True
+        madeup_pred = madeup.predict(newdata2, stderror=True)        
+        madeup.predicted.confidence(coverage=0.99)
+        assert_almost_equal(madeup.predicted.confidence_intervals.lower, 
+                            results[6][::3], 5)
+        assert_almost_equal(madeup.predicted.confidence_intervals.fit, 
+                            results[6][1::3], 5)
+        assert_almost_equal(madeup.predicted.confidence_intervals.upper, 
+                            results[6][2::3], 5)
+        # Direct access
+        confinv = madeup.predicted.confidence(coverage=0.99)
+        assert_almost_equal(confinv.lower, results[6][::3], 5)
+        assert_almost_equal(confinv.fit, results[6][1::3], 5)
+        assert_almost_equal(confinv.upper, results[6][2::3], 5)
+    
+#####---------------------------------------------------------------------------
+#---- --- test 1D ---
+#####---------------------------------------------------------------------------
+class test_loess_gas(NumpyTestCase):
+    "Test class for lowess."
+    #
+    def __init__(self, *args, **kwds):
+        NumpyTestCase.__init__(self, *args, **kwds)
+        NOx = marray([4.818, 2.849, 3.275, 4.691, 4.255, 5.064, 2.118, 4.602,
+                      2.286, 0.970, 3.965, 5.344, 3.834, 1.990, 5.199, 5.283,
+                      3.752, 0.537, 1.640, 5.055, 4.937, 1.561])
+        E = marray([0.831, 1.045, 1.021, 0.970, 0.825, 0.891, 0.71, 0.801,
+                    1.074, 1.148, 1.000, 0.928, 0.767, 0.701, 0.807, 0.902,
+                    0.997, 1.224, 1.089, 0.973, 0.980, 0.665])
+        gas_fit_E = numpy.array([0.665, 0.949, 1.224])
+        newdata = numpy.array([0.6650000, 0.7581667, 0.8513333, 0.9445000,
+                               1.0376667, 1.1308333, 1.2240000])
+        coverage = 0.99
+
+        rfile = open(os.path.join('tests','gas_result'), 'r')
+        results = []
+        for i in range(8):
+            rfile.readline()
+            z = fromiter((float(v) for v in rfile.readline().rstrip().split()),
+                         float_)
+            results.append(z)        
+        self.d = (E, NOx, gas_fit_E, newdata, coverage, results)
+    #
+    def test_1dbasic(self):
+        "Basic test 1d"
+        (E, NOx, _, _, _, results) = self.d
+        gas = loess(E,NOx)
+        gas.model.span = 2./3.
+        gas.fit()
+        assert_almost_equal(gas.outputs.fitted_values, results[0], 6)
+        assert_almost_equal(gas.outputs.enp, 5.5, 1)
+        assert_almost_equal(gas.outputs.s, 0.3404, 4)
+    #
+    def test_1dbasic_alt(self):
+        "Basic test 1d - part #2"
+        (E, NOx, _, _, _, results) = self.d
+        gas_null = loess(E, NOx)
+        gas_null.model.span = 1.0
+        gas_null.fit()
+        assert_almost_equal(gas_null.outputs.fitted_values, results[1], 5)
+        assert_almost_equal(gas_null.outputs.enp, 3.5, 1)
+        assert_almost_equal(gas_null.outputs.s, 0.5197, 4)
+    #
+    def test_1dpredict(self):
+        "Basic test 1d - prediction"
+        (E, NOx, gas_fit_E, _, _, results) = self.d
+        gas = loess(E,NOx, span=2./3.)
+        gas.fit()
+        gas.predict(gas_fit_E, stderror=False)
+        assert_almost_equal(gas.predicted.values, results[2], 6)
+    #
+    def test_1dpredict_2(self):
+        "Basic test 1d - new predictions"
+        (E, NOx, _, newdata, _, results) = self.d        
+        gas = loess(E,NOx, span=2./3.)
+        gas.predict(newdata, stderror=True)
+        gas.predicted.confidence(0.99)
+        assert_almost_equal(gas.predicted.confidence_intervals.lower,
+                            results[3][0::3], 6)
+        assert_almost_equal(gas.predicted.confidence_intervals.fit,
+                            results[3][1::3], 6)
+        assert_almost_equal(gas.predicted.confidence_intervals.upper,
+                            results[3][2::3], 6)
+    #
+    def test_anova(self):
+        "Tests anova"
+        (E, NOx, _, _, _, results) = self.d        
+        gas = loess(E,NOx, span=2./3.)
+        gas.fit()
+        gas_null = loess(E, NOx, span=1.0)
+        gas_null.fit()
+        gas_anova = loess_anova(gas, gas_null)
+        gas_anova_theo = results[4]
+        assert_almost_equal(gas_anova.dfn, gas_anova_theo[0], 5)
+        assert_almost_equal(gas_anova.dfd, gas_anova_theo[1], 5)
+        assert_almost_equal(gas_anova.F_value, gas_anova_theo[2], 5)
+        assert_almost_equal(gas_anova.Pr_F, gas_anova_theo[3], 5)
+    #
+    def test_failures(self):
+        "Tests failures"
+        (E, NOx, gas_fit_E, _, _, _) = self.d       
+        gas = loess(E,NOx, span=2./3.)
+        # This one should fail (all parametric)
+        gas.model.parametric_flags = True
+        self.assertRaises(ValueError, gas.fit)
+        # This one also (all drop_square)
+        gas.model.drop_square_flags = True
+        self.assertRaises(ValueError, gas.fit)
+        gas.model.degree = 1
+        self.assertRaises(ValueError, gas.fit)
+        # This one should not (revert to std)
+        gas.model.parametric_flags = False
+        gas.model.drop_square_flags = False
+        gas.model.degree = 2
+        gas.fit()
+        # Now, for predict .................
+        gas.predict(gas_fit_E, stderror=False)
+        # This one should fail (extrapolation & blending)
+        self.assertRaises(ValueError, 
+                          gas.predict, gas.predicted.values, stderror=False)
+        # But this one should not ..........
+        gas.predict(gas_fit_E, stderror=False)
+    #
+    def test_mask(self):
+        NOx = marray([4.818, 2.849, 3.275, 4.691, 4.255, 5.064, 2.118, 4.602,
+                      2.286, 0.970, 3.965, 5.344, 3.834, 1.990, 5.199, 5.283,
+                      -9999, -9999, 3.752, 0.537, 1.640, 5.055, 4.937, 1.561])
+        NOx = maskedarray.masked_values(NOx, -9999)
+        E = marray([0.831, 1.045, 1.021, 0.970, 0.825, 0.891, 0.71, 0.801,
+                    1.074, 1.148, 1.000, 0.928, 0.767, 0.701, 0.807, 0.902,
+                    -9999, -9999, 0.997, 1.224, 1.089, 0.973, 0.980, 0.665])
+        gas_fit_E = numpy.array([0.665, 0.949, 1.224])
+        newdata = numpy.array([0.6650000, 0.7581667, 0.8513333, 0.9445000,
+                               1.0376667, 1.1308333, 1.2240000])
+        coverage = 0.99
+
+        rfile = open(os.path.join('tests','gas_result'), 'r')
+        results = []
+        for i in range(8):
+            rfile.readline()
+            z = fromiter((float(v) for v in rfile.readline().rstrip().split()),
+                         float_)
+            results.append(z)   
+        #
+        gas = loess(E,NOx)
+        gas.model.span = 2./3.
+        gas.fit()
+        assert_almost_equal(gas.outputs.fitted_values.compressed(), results[0], 6)
+        assert_almost_equal(gas.outputs.enp, 5.5, 1)
+        assert_almost_equal(gas.outputs.s, 0.3404, 4) 
+        
+        
+        
+        
+
+
+
+########################################################################
+if __name__ == '__main__':
+    NumpyTest().run()       
+
+    
+


Property changes on: trunk/Lib/sandbox/pyloess/tests/test_mpyloess.py
___________________________________________________________________
Name: svn:keywords
   + Date 
Author 
Revision
Id

Modified: trunk/Lib/sandbox/pyloess/tests/test_pyloess.py
===================================================================
--- trunk/Lib/sandbox/pyloess/tests/test_pyloess.py	2007-03-26 19:37:12 UTC (rev 2873)
+++ trunk/Lib/sandbox/pyloess/tests/test_pyloess.py	2007-03-27 06:38:36 UTC (rev 2874)
@@ -1,15 +1,15 @@
 """
-Wrapper to lowess and stl routines.
+Test series for lowess, stl and loess routines.
 
 :author: Pierre GF Gerard-Marchant
 :contact: pierregm_at_uga_edu
-:date: $Date: 2007-02-28 02:23:25 -0500 (Wed, 28 Feb 2007) $
-:version: $Id: generic.py 145 2007-02-28 07:23:25Z backtopop $
+:date: $Date$
+:version: $Id$
 """
-__author__ = "Pierre GF Gerard-Marchant ($Author: backtopop $)"
+__author__ = "Pierre GF Gerard-Marchant ($Author$)"
 __version__ = '1.0'
-__revision__ = "$Revision: 145 $"
-__date__     = '$Date: 2007-02-28 02:23:25 -0500 (Wed, 28 Feb 2007) $'
+__revision__ = "$Revision$"
+__date__     = '$Date$'
 
 import os
 
@@ -18,6 +18,7 @@
 import numpy.core.numeric as numeric
 from numpy.core.records import recarray
 fromiter = numpy.fromiter
+narray = numpy.array
 
 
 from numpy.testing import NumpyTest, NumpyTestCase
@@ -36,9 +37,10 @@
     #
     def __init__(self, *args, **kwds):
         NumpyTestCase.__init__(self, *args, **kwds)
-        X = [ 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8,10,12,14,50]
-        Y = [18, 2,15, 6,10, 4,16,11, 7, 3,14,17,20,12, 9,13, 1, 8, 5,19]
-        self.data = (X, Y)
+        X = narray([ 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8,10,12,14,50])
+        Y = narray([18, 2,15, 6,10, 4,16,11, 7, 3,14,17,20,12, 9,13, 1, 8, 5,19])
+        idx = X.argsort()
+        self.data = (X[idx], Y[idx])
     #............................................
     def test_lowess_1(self):
         "Tests lowess on typical data. part #1."
@@ -46,9 +48,10 @@
         YS = [13.659,11.145, 8.701, 9.722,10.000,11.300,11.300,11.300,
               11.300,11.300,11.300,11.300,11.300,11.300,11.300,13.000, 
               6.440, 5.596,  5.456,18.998]
-        Z = lowess(X, Y, f=0.25, nsteps=0, delta=0)
-        assert_almost_equal(Z.smooth, YS, decimal=3)
-        assert_almost_equal(Z.residuals+Z.smooth, Y, decimal=3)
+        Z = lowess(X, Y, span=0.25, nsteps=0, delta=0)
+        assert_almost_equal(Z.outputs.fitted_values, YS, decimal=3)
+        assert_almost_equal(Z.outputs.fitted_residuals+Z.outputs.fitted_values, 
+                            Z.inputs.y, decimal=3)   
     #............................................
     def test_lowess_2(self):
         "Tests lowess on typical data. part #2."
@@ -56,9 +59,10 @@
         YS = [13.659,12.347,11.034, 9.722,10.511,11.300,11.300,11.300,
               11.300,11.300,11.300,11.300,11.300,11.300,11.300,13.000, 
                6.440, 5.596, 5.456,18.998]
-        Z = lowess(X, Y, f=0.25, nsteps=0, delta=3)
-        assert_almost_equal(Z.smooth, YS, decimal=3)
-        assert_almost_equal(Z.residuals+Z.smooth, Y, decimal=3)        
+        Z = lowess(X, Y, span=0.25, nsteps=0, delta=3)
+        assert_almost_equal(Z.outputs.fitted_values, YS, decimal=3)
+        assert_almost_equal(Z.outputs.fitted_residuals+Z.outputs.fitted_values, 
+                            Z.inputs.y, decimal=3)          
     #............................................
     def test_lowess_3(self):
         "Tests lowess on typical data. part #3."
@@ -66,9 +70,10 @@
         YS = [14.811,12.115, 8.984, 9.676,10.000,11.346,11.346,11.346,
               11.346,11.346,11.346,11.346,11.346,11.346,11.346,13.000, 
                6.734, 5.744, 5.415,18.998 ]
-        Z = lowess(X, Y, f=0.25, nsteps=2, delta=0)
-        assert_almost_equal(Z.smooth, YS, decimal=3)
-        assert_almost_equal(Z.residuals+Z.smooth, Y, decimal=3)        
+        Z = lowess(X, Y, span=0.25, nsteps=2, delta=0)
+        assert_almost_equal(Z.outputs.fitted_values, YS, decimal=3)
+        assert_almost_equal(Z.outputs.fitted_residuals+Z.outputs.fitted_values, 
+                            Z.inputs.y, decimal=3)          
 
 #####---------------------------------------------------------------------------
 #---- --- STL ---
@@ -131,8 +136,6 @@
         dfile.readline()
         y = fromiter((float(v) for v in dfile.readline().rstrip().split()),
                      float_)
-        dfile = open(os.path.join('tests','madeup_data'), 'r')
-        dfile.readline()
         #
         rfile = open(os.path.join('tests','madeup_result'), 'r')
         results = []


Property changes on: trunk/Lib/sandbox/pyloess/tests/test_pyloess.py
___________________________________________________________________
Name: svn:keywords
   + Date 
Author 
Revision
Id




More information about the Scipy-svn mailing list