<p dir="auto">When I execute a command like</p>
<blockquote>
<p dir="auto">sns.pairplot(x, hue = 'species', diag_kind='kde')</p>
</blockquote>
<p dir="auto">The following error is raised:</p>
<blockquote>
<p dir="auto">TypeError: slice indices must be integers or None or have an <strong>index</strong> method</p>
</blockquote>
<p dir="auto">This happens after upgrading to matplotlib 2.0.  If I remove the diag_kind argument, the function executes.</p>
<p dir="auto">when I run the demo Example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import numpy as np; np.random.seed(10)
&gt;&gt;&gt; import seaborn as sns; sns.set(color_codes=True)
&gt;&gt;&gt; mean, cov = [0, 2], [(1, .5), (.5, 1)]
&gt;&gt;&gt; x, y = np.random.multivariate_normal(mean, cov, size=50).T
&gt;&gt;&gt; ax = sns.kdeplot(x)"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import numpy as np; np.random.seed(10)
&gt;&gt;&gt; import seaborn as sns; sns.set(color_codes=True)
&gt;&gt;&gt; mean, cov = [0, 2], [(1, .5), (.5, 1)]
&gt;&gt;&gt; x, y = np.random.multivariate_normal(mean, cov, size=50).T
&gt;&gt;&gt; ax = sns.kdeplot(x)
</code></pre></div>
<p dir="auto">it report an error as below:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;D:\Python\Python35\lib\site-packages\seaborn\distributions.py&quot;, line 604, in kdeplot
    cumulative=cumulative, **kwargs)
  File &quot;D:\Python\Python35\lib\site-packages\seaborn\distributions.py&quot;, line 270, in _univariate_kdeplot
    cumulative=cumulative)
  File &quot;D:\Python\Python35\lib\site-packages\seaborn\distributions.py&quot;, line 328, in _statsmodels_univariate_kde
    kde.fit(kernel, bw, fft, gridsize=gridsize, cut=cut, clip=clip)
  File &quot;D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kde.py&quot;, line 146, in fit
    clip=clip, cut=cut)
  File &quot;D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kde.py&quot;, line 506, in kdensityfft
    f = revrt(zstar)
  File &quot;D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kdetools.py&quot;, line 20, in revrt
    y = X[:m/2+1] + np.r_[0,X[m/2+1:],0]*1j
TypeError: slice indices must be integers or None or have an __index__ method"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "D:\Python\Python35\lib\site-packages\seaborn\distributions.py", line 604, in kdeplot
    cumulative=cumulative, **kwargs)
  File "D:\Python\Python35\lib\site-packages\seaborn\distributions.py", line 270, in _univariate_kdeplot
    cumulative=cumulative)
  File "D:\Python\Python35\lib\site-packages\seaborn\distributions.py", line 328, in _statsmodels_univariate_kde
    kde.fit(kernel, bw, fft, gridsize=gridsize, cut=cut, clip=clip)
  File "D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kde.py", line 146, in fit
    clip=clip, cut=cut)
  File "D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kde.py", line 506, in kdensityfft
    f = revrt(zstar)
  File "D:\Python\Python35\lib\site-packages\statsmodels\nonparametric\kdetools.py", line 20, in revrt
    y = X[:m/2+1] + np.r_[0,X[m/2+1:],0]*1j
TypeError: slice indices must be integers or None or have an __index__ method
</code></pre></div>
<p dir="auto">My platform is win10 and seaborn version is (0.7.1) and  statsmodels version is (0.6.1).</p>