one kdeplot function error of seaborn
See original GitHub issuewhen I run the demo Example:
>>> import numpy as np; np.random.seed(10)
>>> import seaborn as sns; sns.set(color_codes=True)
>>> mean, cov = [0, 2], [(1, .5), (.5, 1)]
>>> x, y = np.random.multivariate_normal(mean, cov, size=50).T
>>> ax = sns.kdeplot(x)
it report an error as below:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
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
My platform is win10 and seaborn version is (0.7.1) and statsmodels version is (0.6.1).
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
seaborn.kdeplot — seaborn 0.12.1 documentation - PyData |
A kernel density estimate (KDE) plot is a method for visualizing the distribution of observations in a dataset, analogous to a histogram.
Read more >Using seaborn kdeplot returns errors - python - Stack Overflow
I'm trying to make a kde plot for some data, which looks like this: age sex 0 39 Male 1 50 Male 2...
Read more >Seaborn Kdeplot - A Comprehensive Guide - DigitalOcean
kdeplot () function is used to plot the data against a single/univariate variable. It represents the probability distribution of the data values ...
Read more >How to use the seaborn.kdeplot function in seaborn - Snyk
To help you get started, we've selected a few seaborn examples, based on popular ways it is used in public projects. ; if...
Read more >Seaborn Kdeplot – A Comprehensive Guide - GeeksforGeeks
Kernel Density Estimate (KDE) Plot and Kdeplot allows us to estimate the probability density function of the continuous or non-parametric ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@PyAntony update your statsmodels package to 0.8.0
pip install -U statsmodelsshould do the trickI had this issue but upgrading to statsmodels 0.8.0 worked for me. I used:
conda install -c statsmodels statsmodels=0.8.0