我正在运行以下代码并得到此问题-
"/usr/local/lib/python2.7/dist-packages/seaborn/timeseries.py:183: UserWarning: The tsplot function is deprecated and will be removed or replaced (in a substantially altered version) in a future release. warnings.warn(msg, UserWarning) ".
有人知道怎么解决这个问题吗?在
代码-
import numpy as np
import tensorflow as tf
import seaborn as sns
import pandas as pd
SEQ_LEN = 10
def create_time_series():
freq = (np.random.random()*0.5) + 0.1 # 0.1 to 0.6
ampl = np.random.random() + 0.5 # 0.5 to 1.5
x = np.sin(np.arange(0,SEQ_LEN) * freq) * ampl
return x
for i in xrange(0, 5):
sns.tsplot( create_time_series() ); # 5 series
根据评论:这是一个警告,不是错误。有人警告您,您使用的函数将来将从Seaborn中删除。忽略警告或使用其他函数,例如}。在
plt.plot()
from{相关问题 更多 >
编程相关推荐