We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
lowes test failure Ubuntu
https://launchpadlibrarian.net/144807626/buildlog_ubuntu-raring-amd64.statsmodels_0.5.0~ppa17~revno-1430~raring1_UPLOADING.txt.gz

```
======================================================================
ERROR: statsmodels.nonparametric.tests.test_lowess.TestLowess.test_options
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/buildd/statsmodels-0.5.0~ppa17~revno/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/nonparametric/tests/test_lowess.py", line 144, in test_options
    return_sorted=False)
  File "/build/buildd/statsmodels-0.5.0~ppa17~revno/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/nonparametric/smoothers_lowess.py", line 182, in lowess
    yfitted_[mask_valid] = yfitted
ValueError: NumPy boolean array indexing assignment cannot assign 20 input values to the 17 output values where the mask is true
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `statsmodels/nonparametric/smoothers_lowess.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 """Lowess - wrapper for cythonized extension
3 
4 Author : Chris Jordan-Squire
5 Author : Carl Vogel
6 Author : Josef Perktold
7 
8 """
9 
10 import numpy as np
11 from ._smoothers_lowess import lowess as _lowess
12 
13 def lowess(endog, exog, frac=2.0/3.0, it=3, delta=0.0, is_sorted=False,
14            missing='drop', return_sorted=True):
15     '''LOWESS (Locally Weighted Scatterplot Smoothing)
16 
17     A lowess function that outs smoothed estimates of endog
18     at the given exog values from points (exog, endog)
19 
20     Parameters
21     ----------
22     endog: 1-D numpy array
23         The y-values of the observed points
24     exog: 1-D numpy array
25         The x-values of the observed points
26     frac: float
27         Between 0 and 1. The fraction of the data used
28         when estimating each y-value.
29     it: int
30         The number of residual-based reweightings
31         to perform.
32     delta: float
33         Distance within which to use linear-interpolation
34         instead of weighted regression.
35     is_sorted : bool
36         If False (default), then the data will be sorted by exog before
37         calculating lowess. If True, then it is assumed that the data is
38         already sorted by exog.
39     missing : str
40         Available options are 'none', 'drop', and 'raise'. If 'none', no nan
41         checking is done. If 'drop', any observations with nans are dropped.
42         If 'raise', an error is raised. Default is 'drop'.
43     return_sorted : bool
44         If True (default), then the returned array is sorted by exog and has
45         missing (nan or infinite) observations removed.
46         If False, then the returned array is in the same length and the same
47         sequence of observations as the input array.
48 
49     Returns
50     -------
51     out: ndarray, float
52         The returned array is two-dimensional if return_sorted is True, and
53         one dimensional if return_sorted is False.
54         If return_sorted is True, then a numpy array with two columns. The
55         first column contains the sorted x (exog) values and the second column
56         the associated estimated y (endog) values.
57         If return_sorted is False, then only the fitted values are returned,
58         and the observations will be in the same order as the input arrays.
59 
60     Notes
61     -----
62     This lowess function implements the algorithm given in the
63     reference below using local linear estimates.
64 
65     Suppose the input data has N points. The algorithm works by
66     estimating the `smooth` y_i by taking the frac*N closest points
67     to (x_i,y_i) based on their x values and estimating y_i
68     using a weighted linear regression. The weight for (x_j,y_j)
69     is tricube function applied to |x_i-x_j|.
70 
71     If it > 1, then further weighted local linear regressions
72     are performed, where the weights are the same as above
73     times the _lowess_bisquare function of the residuals. Each iteration
74     takes approximately the same amount of time as the original fit,
75     so these iterations are expensive. They are most useful when
76     the noise has extremely heavy tails, such as Cauchy noise.
77     Noise with less heavy-tails, such as t-distributions with df>2,
78     are less problematic. The weights downgrade the influence of
79     points with large residuals. In the extreme case, points whose
80     residuals are larger than 6 times the median absolute residual
81     are given weight 0.
82 
83     `delta` can be used to save computations. For each `x_i`, regressions
84     are skipped for points closer than `delta`. The next regression is
85     fit for the farthest point within delta of `x_i` and all points in
86     between are estimated by linearly interpolating between the two
87     regression fits.
88 
89     Judicious choice of delta can cut computation time considerably
90     for large data (N > 5000). A good choice is ``delta = 0.01 * range(exog)``.
91 
92     Some experimentation is likely required to find a good
93     choice of `frac` and `iter` for a particular dataset.
94 
95     References
96     ----------
97     Cleveland, W.S. (1979) "Robust Locally Weighted Regression
98     and Smoothing Scatterplots". Journal of the American Statistical
99     Association 74 (368): 829-836.
100 
101     Examples
102     --------
103     The below allows a comparison between how different the fits from
104     lowess for different values of frac can be.
105 
106     >>> import numpy as np
107     >>> import statsmodels.api as sm
108     >>> lowess = sm.nonparametric.lowess
109     >>> x = np.random.uniform(low = -2*np.pi, high = 2*np.pi, size=500)
110     >>> y = np.sin(x) + np.random.normal(size=len(x))
111     >>> z = lowess(y, x)
112     >>> w = lowess(y, x, frac=1./3)
113 
114     This gives a similar comparison for when it is 0 vs not.
115 
116     >>> import numpy as np
117     >>> import scipy.stats as stats
118     >>> import statsmodels.api as sm
119     >>> lowess = sm.nonparametric.lowess
120     >>> x = np.random.uniform(low = -2*np.pi, high = 2*np.pi, size=500)
121     >>> y = np.sin(x) + stats.cauchy.rvs(size=len(x))
122     >>> z = lowess(y, x, frac= 1./3, it=0)
123     >>> w = lowess(y, x, frac=1./3)
124 
125     '''
126 
127     endog = np.asarray(endog, float)
128     exog = np.asarray(exog, float)
129 
130     # Inputs should be vectors (1-D arrays) of the
131     # same length.
132     if exog.ndim != 1:
133         raise ValueError('exog must be a vector')
134     if endog.ndim != 1:
135         raise ValueError('endog must be a vector')
136     if endog.shape[0] != exog.shape[0] :
137         raise ValueError('exog and endog must have same length')
138 
139     if missing in ['drop', 'raise']:
140         # Cut out missing values
141         mask_valid = (np.isfinite(exog) & np.isfinite(endog))
142         all_valid = np.all(mask_valid)
143         if all_valid:
144             y = endog
145             x = exog
146         else:
147             if missing == 'drop':
148                 x = exog[mask_valid]
149                 y = endog[mask_valid]
150             else:
151                 raise ValueError('nan or inf found in data')
152     elif missing == 'none':
153         y = endog
154         x = exog
155         all_valid = True   # we assume it's true if missing='none'
156     else:
157         raise ValueError("missing can only be 'none', 'drop' or 'raise'")
158 
159     if not is_sorted:
160         # Sort both inputs according to the ascending order of x values
161         sort_index = np.argsort(x)
162         x = np.array(x[sort_index])
163         y = np.array(y[sort_index])
164 
165     res = _lowess(y, x, frac=frac, it=it, delta=delta)
166     _, yfitted = res.T
167 
168     if return_sorted or (all_valid and is_sorted):
169         return res
170     else:
171         # rebuild yfitted with original indices
172         # a bit messy: y might have been selected twice
173         if not is_sorted:
174             yfitted_ = np.empty_like(endog)
175             yfitted_.fill(np.nan)
176             yfitted_[sort_index] = yfitted
177             yfitted = yfitted_
178 
179         if not all_valid:
180             yfitted_ = np.empty_like(endog)
181             yfitted_.fill(np.nan)
182             yfitted_[mask_valid] = yfitted
183             yfitted = yfitted_
184 
185         # we don't need to return exog anymore
186         return yfitted
187
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/statsmodels/nonparametric/smoothers_lowess.py b/statsmodels/nonparametric/smoothers_lowess.py
--- a/statsmodels/nonparametric/smoothers_lowess.py
+++ b/statsmodels/nonparametric/smoothers_lowess.py
@@ -171,7 +171,7 @@
         # rebuild yfitted with original indices
         # a bit messy: y might have been selected twice
         if not is_sorted:
-            yfitted_ = np.empty_like(endog)
+            yfitted_ = np.empty_like(y)
             yfitted_.fill(np.nan)
             yfitted_[sort_index] = yfitted
             yfitted = yfitted_

{"golden_diff": "diff --git a/statsmodels/nonparametric/smoothers_lowess.py b/statsmodels/nonparametric/smoothers_lowess.py\n--- a/statsmodels/nonparametric/smoothers_lowess.py\n+++ b/statsmodels/nonparametric/smoothers_lowess.py\n@@ -171,7 +171,7 @@\n         # rebuild yfitted with original indices\n         # a bit messy: y might have been selected twice\n         if not is_sorted:\n-            yfitted_ = np.empty_like(endog)\n+            yfitted_ = np.empty_like(y)\n             yfitted_.fill(np.nan)\n             yfitted_[sort_index] = yfitted\n             yfitted = yfitted_\n", "issue": "lowes test failure Ubuntu\nhttps://launchpadlibrarian.net/144807626/buildlog_ubuntu-raring-amd64.statsmodels_0.5.0~ppa17~revno-1430~raring1_UPLOADING.txt.gz\n\n```\n======================================================================\nERROR: statsmodels.nonparametric.tests.test_lowess.TestLowess.test_options\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"/usr/lib/python2.7/dist-packages/nose/case.py\", line 197, in runTest\n    self.test(*self.arg)\n  File \"/build/buildd/statsmodels-0.5.0~ppa17~revno/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/nonparametric/tests/test_lowess.py\", line 144, in test_options\n    return_sorted=False)\n  File \"/build/buildd/statsmodels-0.5.0~ppa17~revno/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/nonparametric/smoothers_lowess.py\", line 182, in lowess\n    yfitted_[mask_valid] = yfitted\nValueError: NumPy boolean array indexing assignment cannot assign 20 input values to the 17 output values where the mask is true\n```\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"Lowess - wrapper for cythonized extension\n\nAuthor : Chris Jordan-Squire\nAuthor : Carl Vogel\nAuthor : Josef Perktold\n\n\"\"\"\n\nimport numpy as np\nfrom ._smoothers_lowess import lowess as _lowess\n\ndef lowess(endog, exog, frac=2.0/3.0, it=3, delta=0.0, is_sorted=False,\n           missing='drop', return_sorted=True):\n    '''LOWESS (Locally Weighted Scatterplot Smoothing)\n\n    A lowess function that outs smoothed estimates of endog\n    at the given exog values from points (exog, endog)\n\n    Parameters\n    ----------\n    endog: 1-D numpy array\n        The y-values of the observed points\n    exog: 1-D numpy array\n        The x-values of the observed points\n    frac: float\n        Between 0 and 1. The fraction of the data used\n        when estimating each y-value.\n    it: int\n        The number of residual-based reweightings\n        to perform.\n    delta: float\n        Distance within which to use linear-interpolation\n        instead of weighted regression.\n    is_sorted : bool\n        If False (default), then the data will be sorted by exog before\n        calculating lowess. If True, then it is assumed that the data is\n        already sorted by exog.\n    missing : str\n        Available options are 'none', 'drop', and 'raise'. If 'none', no nan\n        checking is done. If 'drop', any observations with nans are dropped.\n        If 'raise', an error is raised. Default is 'drop'.\n    return_sorted : bool\n        If True (default), then the returned array is sorted by exog and has\n        missing (nan or infinite) observations removed.\n        If False, then the returned array is in the same length and the same\n        sequence of observations as the input array.\n\n    Returns\n    -------\n    out: ndarray, float\n        The returned array is two-dimensional if return_sorted is True, and\n        one dimensional if return_sorted is False.\n        If return_sorted is True, then a numpy array with two columns. The\n        first column contains the sorted x (exog) values and the second column\n        the associated estimated y (endog) values.\n        If return_sorted is False, then only the fitted values are returned,\n        and the observations will be in the same order as the input arrays.\n\n    Notes\n    -----\n    This lowess function implements the algorithm given in the\n    reference below using local linear estimates.\n\n    Suppose the input data has N points. The algorithm works by\n    estimating the `smooth` y_i by taking the frac*N closest points\n    to (x_i,y_i) based on their x values and estimating y_i\n    using a weighted linear regression. The weight for (x_j,y_j)\n    is tricube function applied to |x_i-x_j|.\n\n    If it > 1, then further weighted local linear regressions\n    are performed, where the weights are the same as above\n    times the _lowess_bisquare function of the residuals. Each iteration\n    takes approximately the same amount of time as the original fit,\n    so these iterations are expensive. They are most useful when\n    the noise has extremely heavy tails, such as Cauchy noise.\n    Noise with less heavy-tails, such as t-distributions with df>2,\n    are less problematic. The weights downgrade the influence of\n    points with large residuals. In the extreme case, points whose\n    residuals are larger than 6 times the median absolute residual\n    are given weight 0.\n\n    `delta` can be used to save computations. For each `x_i`, regressions\n    are skipped for points closer than `delta`. The next regression is\n    fit for the farthest point within delta of `x_i` and all points in\n    between are estimated by linearly interpolating between the two\n    regression fits.\n\n    Judicious choice of delta can cut computation time considerably\n    for large data (N > 5000). A good choice is ``delta = 0.01 * range(exog)``.\n\n    Some experimentation is likely required to find a good\n    choice of `frac` and `iter` for a particular dataset.\n\n    References\n    ----------\n    Cleveland, W.S. (1979) \"Robust Locally Weighted Regression\n    and Smoothing Scatterplots\". Journal of the American Statistical\n    Association 74 (368): 829-836.\n\n    Examples\n    --------\n    The below allows a comparison between how different the fits from\n    lowess for different values of frac can be.\n\n    >>> import numpy as np\n    >>> import statsmodels.api as sm\n    >>> lowess = sm.nonparametric.lowess\n    >>> x = np.random.uniform(low = -2*np.pi, high = 2*np.pi, size=500)\n    >>> y = np.sin(x) + np.random.normal(size=len(x))\n    >>> z = lowess(y, x)\n    >>> w = lowess(y, x, frac=1./3)\n\n    This gives a similar comparison for when it is 0 vs not.\n\n    >>> import numpy as np\n    >>> import scipy.stats as stats\n    >>> import statsmodels.api as sm\n    >>> lowess = sm.nonparametric.lowess\n    >>> x = np.random.uniform(low = -2*np.pi, high = 2*np.pi, size=500)\n    >>> y = np.sin(x) + stats.cauchy.rvs(size=len(x))\n    >>> z = lowess(y, x, frac= 1./3, it=0)\n    >>> w = lowess(y, x, frac=1./3)\n\n    '''\n\n    endog = np.asarray(endog, float)\n    exog = np.asarray(exog, float)\n\n    # Inputs should be vectors (1-D arrays) of the\n    # same length.\n    if exog.ndim != 1:\n        raise ValueError('exog must be a vector')\n    if endog.ndim != 1:\n        raise ValueError('endog must be a vector')\n    if endog.shape[0] != exog.shape[0] :\n        raise ValueError('exog and endog must have same length')\n\n    if missing in ['drop', 'raise']:\n        # Cut out missing values\n        mask_valid = (np.isfinite(exog) & np.isfinite(endog))\n        all_valid = np.all(mask_valid)\n        if all_valid:\n            y = endog\n            x = exog\n        else:\n            if missing == 'drop':\n                x = exog[mask_valid]\n                y = endog[mask_valid]\n            else:\n                raise ValueError('nan or inf found in data')\n    elif missing == 'none':\n        y = endog\n        x = exog\n        all_valid = True   # we assume it's true if missing='none'\n    else:\n        raise ValueError(\"missing can only be 'none', 'drop' or 'raise'\")\n\n    if not is_sorted:\n        # Sort both inputs according to the ascending order of x values\n        sort_index = np.argsort(x)\n        x = np.array(x[sort_index])\n        y = np.array(y[sort_index])\n\n    res = _lowess(y, x, frac=frac, it=it, delta=delta)\n    _, yfitted = res.T\n\n    if return_sorted or (all_valid and is_sorted):\n        return res\n    else:\n        # rebuild yfitted with original indices\n        # a bit messy: y might have been selected twice\n        if not is_sorted:\n            yfitted_ = np.empty_like(endog)\n            yfitted_.fill(np.nan)\n            yfitted_[sort_index] = yfitted\n            yfitted = yfitted_\n\n        if not all_valid:\n            yfitted_ = np.empty_like(endog)\n            yfitted_.fill(np.nan)\n            yfitted_[mask_valid] = yfitted\n            yfitted = yfitted_\n\n        # we don't need to return exog anymore\n        return yfitted\n", "path": "statsmodels/nonparametric/smoothers_lowess.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"Lowess - wrapper for cythonized extension\n\nAuthor : Chris Jordan-Squire\nAuthor : Carl Vogel\nAuthor : Josef Perktold\n\n\"\"\"\n\nimport numpy as np\nfrom ._smoothers_lowess import lowess as _lowess\n\ndef lowess(endog, exog, frac=2.0/3.0, it=3, delta=0.0, is_sorted=False,\n           missing='drop', return_sorted=True):\n    '''LOWESS (Locally Weighted Scatterplot Smoothing)\n\n    A lowess function that outs smoothed estimates of endog\n    at the given exog values from points (exog, endog)\n\n    Parameters\n    ----------\n    endog: 1-D numpy array\n        The y-values of the observed points\n    exog: 1-D numpy array\n        The x-values of the observed points\n    frac: float\n        Between 0 and 1. The fraction of the data used\n        when estimating each y-value.\n    it: int\n        The number of residual-based reweightings\n        to perform.\n    delta: float\n        Distance within which to use linear-interpolation\n        instead of weighted regression.\n    is_sorted : bool\n        If False (default), then the data will be sorted by exog before\n        calculating lowess. If True, then it is assumed that the data is\n        already sorted by exog.\n    missing : str\n        Available options are 'none', 'drop', and 'raise'. If 'none', no nan\n        checking is done. If 'drop', any observations with nans are dropped.\n        If 'raise', an error is raised. Default is 'drop'.\n    return_sorted : bool\n        If True (default), then the returned array is sorted by exog and has\n        missing (nan or infinite) observations removed.\n        If False, then the returned array is in the same length and the same\n        sequence of observations as the input array.\n\n    Returns\n    -------\n    out: ndarray, float\n        The returned array is two-dimensional if return_sorted is True, and\n        one dimensional if return_sorted is False.\n        If return_sorted is True, then a numpy array with two columns. The\n        first column contains the sorted x (exog) values and the second column\n        the associated estimated y (endog) values.\n        If return_sorted is False, then only the fitted values are returned,\n        and the observations will be in the same order as the input arrays.\n\n    Notes\n    -----\n    This lowess function implements the algorithm given in the\n    reference below using local linear estimates.\n\n    Suppose the input data has N points. The algorithm works by\n    estimating the `smooth` y_i by taking the frac*N closest points\n    to (x_i,y_i) based on their x values and estimating y_i\n    using a weighted linear regression. The weight for (x_j,y_j)\n    is tricube function applied to |x_i-x_j|.\n\n    If it > 1, then further weighted local linear regressions\n    are performed, where the weights are the same as above\n    times the _lowess_bisquare function of the residuals. Each iteration\n    takes approximately the same amount of time as the original fit,\n    so these iterations are expensive. They are most useful when\n    the noise has extremely heavy tails, such as Cauchy noise.\n    Noise with less heavy-tails, such as t-distributions with df>2,\n    are less problematic. The weights downgrade the influence of\n    points with large residuals. In the extreme case, points whose\n    residuals are larger than 6 times the median absolute residual\n    are given weight 0.\n\n    `delta` can be used to save computations. For each `x_i`, regressions\n    are skipped for points closer than `delta`. The next regression is\n    fit for the farthest point within delta of `x_i` and all points in\n    between are estimated by linearly interpolating between the two\n    regression fits.\n\n    Judicious choice of delta can cut computation time considerably\n    for large data (N > 5000). A good choice is ``delta = 0.01 * range(exog)``.\n\n    Some experimentation is likely required to find a good\n    choice of `frac` and `iter` for a particular dataset.\n\n    References\n    ----------\n    Cleveland, W.S. (1979) \"Robust Locally Weighted Regression\n    and Smoothing Scatterplots\". Journal of the American Statistical\n    Association 74 (368): 829-836.\n\n    Examples\n    --------\n    The below allows a comparison between how different the fits from\n    lowess for different values of frac can be.\n\n    >>> import numpy as np\n    >>> import statsmodels.api as sm\n    >>> lowess = sm.nonparametric.lowess\n    >>> x = np.random.uniform(low = -2*np.pi, high = 2*np.pi, size=500)\n    >>> y = np.sin(x) + np.random.normal(size=len(x))\n    >>> z = lowess(y, x)\n    >>> w = lowess(y, x, frac=1./3)\n\n    This gives a similar comparison for when it is 0 vs not.\n\n    >>> import numpy as np\n    >>> import scipy.stats as stats\n    >>> import statsmodels.api as sm\n    >>> lowess = sm.nonparametric.lowess\n    >>> x = np.random.uniform(low = -2*np.pi, high = 2*np.pi, size=500)\n    >>> y = np.sin(x) + stats.cauchy.rvs(size=len(x))\n    >>> z = lowess(y, x, frac= 1./3, it=0)\n    >>> w = lowess(y, x, frac=1./3)\n\n    '''\n\n    endog = np.asarray(endog, float)\n    exog = np.asarray(exog, float)\n\n    # Inputs should be vectors (1-D arrays) of the\n    # same length.\n    if exog.ndim != 1:\n        raise ValueError('exog must be a vector')\n    if endog.ndim != 1:\n        raise ValueError('endog must be a vector')\n    if endog.shape[0] != exog.shape[0] :\n        raise ValueError('exog and endog must have same length')\n\n    if missing in ['drop', 'raise']:\n        # Cut out missing values\n        mask_valid = (np.isfinite(exog) & np.isfinite(endog))\n        all_valid = np.all(mask_valid)\n        if all_valid:\n            y = endog\n            x = exog\n        else:\n            if missing == 'drop':\n                x = exog[mask_valid]\n                y = endog[mask_valid]\n            else:\n                raise ValueError('nan or inf found in data')\n    elif missing == 'none':\n        y = endog\n        x = exog\n        all_valid = True   # we assume it's true if missing='none'\n    else:\n        raise ValueError(\"missing can only be 'none', 'drop' or 'raise'\")\n\n    if not is_sorted:\n        # Sort both inputs according to the ascending order of x values\n        sort_index = np.argsort(x)\n        x = np.array(x[sort_index])\n        y = np.array(y[sort_index])\n\n    res = _lowess(y, x, frac=frac, it=it, delta=delta)\n    _, yfitted = res.T\n\n    if return_sorted or (all_valid and is_sorted):\n        return res\n    else:\n        # rebuild yfitted with original indices\n        # a bit messy: y might have been selected twice\n        if not is_sorted:\n            yfitted_ = np.empty_like(y)\n            yfitted_.fill(np.nan)\n            yfitted_[sort_index] = yfitted\n            yfitted = yfitted_\n\n        if not all_valid:\n            yfitted_ = np.empty_like(endog)\n            yfitted_.fill(np.nan)\n            yfitted_[mask_valid] = yfitted\n            yfitted = yfitted_\n\n        # we don't need to return exog anymore\n        return yfitted\n", "path": "statsmodels/nonparametric/smoothers_lowess.py"}]}