RLa*_*ave 5 python plot warnings seaborn
每当我尝试使用distplot时seaborn,我都会显示此警告,而我似乎无法弄清楚我做错了什么,对不起,如果这很简单的话.
警告:
FutureWarning:不推荐使用非元组序列进行多维索引; 用
arr[tuple(seq)]而不是arr[seq].将来,这将被解释为数组索引arr[np.array(seq)],这将导致错误或不同的结果.return np.add.reduce(sorted [indexer]*weights,axis = axis)/ sumval
这是一个可重复的例子:
import numpy as np
import pandas as pd
import random
import seaborn as sns
kde_data = np.random.normal(loc=0.0, scale=1, size=100) # fake data
kde_data = pd.DataFrame(kde_data)
kde_data.columns = ["value"]
#kde_data.head()
Run Code Online (Sandbox Code Playgroud)
现在,情节是正确的,但我继续得到warning上述并使用arr[tuple(seq)]而arr[seq]不是帮助我.
sns.distplot(kde_data.value, hist=False, kde=True)
Run Code Online (Sandbox Code Playgroud)
我正在研究Jupyter,这是模块版本:
seaborn==0.9.0
scipy==1.1.0
pandas==0.23.0
numpy==1.15.4
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1299 次 |
| 最近记录: |