Если вы по-прежнему получаете предупреждения на других участках морского побережья, вы можете заранее выполнить следующее. Это полезно в Jupyter Notebook, потому что из-за предупреждений отчет выглядит плохо, даже если ваши графики великолепны.

ал S / O, но я не мог найти ответ на этот вопрос.

Когда я пытаюсь построить участок распространения, используя морскую природу, я получаю предупреждение о будущем. Мне было интересно, что может быть проблема здесь.

import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
% matplotlib inline
from sklearn import datasets

iris = datasets.load_iris()
df = pd.DataFrame(iris.data, columns=iris.feature_names)
df['class'] = iris.target
df['species'] = df['class'].map({idx:s for idx, s in enum,erate(iris.target_names)})


fig, ((ax1,ax2),(ax3,ax4))= plt.subplots(2,2, figsize =(13,9))
sns.distplot(a = df.iloc[:,0], ax=ax1)
sns.distplot(a = df.iloc[:,1], ax=ax2)
sns.distplot(a = df.iloc[:,2], ax=ax3)
sns.distplot(a = df.iloc[:,3], ax=ax4)
plt.show()

Это предупреждение:

C:\ProgramData\Anaconda3\lib\site-packages\scipy\stats\stats.py:1713:
FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; 
use `arr[tuple(seq)]` instead of `arr[seq]`. 
In the future this will be interpreted as an array index, `arr[np.array(seq)]`,
which will result either in an error or a different result.
return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval

Любая помощь? Вы можете запустить приведенный выше код. Вы получите предупреждение.

Панды:0.23.4Морской Рог:0.9.0, matplotlib:2.2.3, scipy:1.1.0нуди:1.15.0'

Ответы на вопрос(0)

Ваш ответ на вопрос