<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import seaborn as sns
sns.regplot(x=[1], y=[1])"><pre class="notranslate"><code class="notranslate">import seaborn as sns
sns.regplot(x=[1], y=[1])
</code></pre></div>
<p dir="auto">will cause following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="IndexError                                Traceback (most recent call last)
&lt;ipython-input-3-4dd949c43459&gt; in &lt;module&gt;
----&gt; 1 sns.regplot(x=[1], y=[1])

~/venv/lib/python3.7/site-packages/seaborn/regression.py in regplot(x, y, data, x_estimator, x_bins, x_ci, scatter, fit_reg, ci, n_boot, units, seed, order, logistic, lowess, robust, logx, x_partial, y_partial, truncate, dropna, x_jitter, y_jitter, label, color, marker, scatter_kws, line_kws, ax)
    808                                  order, logistic, lowess, robust, logx,
    809                                  x_partial, y_partial, truncate, dropna,
--&gt; 810                                  x_jitter, y_jitter, color, label)
    811 
    812     if ax is None:

~/venv/lib/python3.7/site-packages/seaborn/regression.py in __init__(self, x, y, data, x_estimator, x_bins, x_ci, scatter, fit_reg, ci, n_boot, units, seed, order, logistic, lowess, robust, logx, x_partial, y_partial, truncate, dropna, x_jitter, y_jitter, color, label)
    112         # Drop null observations
    113         if dropna:
--&gt; 114             self.dropna(&quot;x&quot;, &quot;y&quot;, &quot;units&quot;, &quot;x_partial&quot;, &quot;y_partial&quot;)
    115 
    116         # Regress nuisance variables out of the data

~/venv/lib/python3.7/site-packages/seaborn/regression.py in dropna(self, *vars)
     64             val = getattr(self, var)
     65             if val is not None:
---&gt; 66                 setattr(self, var, val[not_na])
     67 
     68     def plot(self, ax):

IndexError: too many indices for array"><pre class="notranslate"><code class="notranslate">IndexError                                Traceback (most recent call last)
&lt;ipython-input-3-4dd949c43459&gt; in &lt;module&gt;
----&gt; 1 sns.regplot(x=[1], y=[1])

~/venv/lib/python3.7/site-packages/seaborn/regression.py in regplot(x, y, data, x_estimator, x_bins, x_ci, scatter, fit_reg, ci, n_boot, units, seed, order, logistic, lowess, robust, logx, x_partial, y_partial, truncate, dropna, x_jitter, y_jitter, label, color, marker, scatter_kws, line_kws, ax)
    808                                  order, logistic, lowess, robust, logx,
    809                                  x_partial, y_partial, truncate, dropna,
--&gt; 810                                  x_jitter, y_jitter, color, label)
    811 
    812     if ax is None:

~/venv/lib/python3.7/site-packages/seaborn/regression.py in __init__(self, x, y, data, x_estimator, x_bins, x_ci, scatter, fit_reg, ci, n_boot, units, seed, order, logistic, lowess, robust, logx, x_partial, y_partial, truncate, dropna, x_jitter, y_jitter, color, label)
    112         # Drop null observations
    113         if dropna:
--&gt; 114             self.dropna("x", "y", "units", "x_partial", "y_partial")
    115 
    116         # Regress nuisance variables out of the data

~/venv/lib/python3.7/site-packages/seaborn/regression.py in dropna(self, *vars)
     64             val = getattr(self, var)
     65             if val is not None:
---&gt; 66                 setattr(self, var, val[not_na])
     67 
     68     def plot(self, ax):

IndexError: too many indices for array
</code></pre></div>
<p dir="auto"><strong>This bug only exists in 0.10.0, but not in 0.9.0.</strong></p>
<p dir="auto">For example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
import pandas as pd
import seaborn as sns

df = pd.DataFrame({
    'col': np.append(np.random.choice(np.array(['a', 'b', 'c']), 10), ['d']),
    'x': np.random.normal(size = 11),
    'y': np.random.normal(size = 11),
})

sns.lmplot(x = 'x', y = 'y', col = 'col', data = df)"><pre class="notranslate"><code class="notranslate">import numpy as np
import pandas as pd
import seaborn as sns

df = pd.DataFrame({
    'col': np.append(np.random.choice(np.array(['a', 'b', 'c']), 10), ['d']),
    'x': np.random.normal(size = 11),
    'y': np.random.normal(size = 11),
})

sns.lmplot(x = 'x', y = 'y', col = 'col', data = df)
</code></pre></div>
<p dir="auto">It raises <code class="notranslate">IndexError: invalid index to scalar variable</code> which is not very intuitive. I think this case can occur with any data coming from the real world, and would be much nicer to exclude this group automatically or simply plot the single dot without regression line.</p>