Seaborn tsplot error

I run the following code and get this problem -

"/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 modified version) in a future release. warnings.warn (msg, UserWarning) ".

Does anyone know how to fix this problem?

The code-

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
+2
source share
1 answer

According to comments: This is a warning, not an error. You are warned that the feature you are using will be removed from Seaborn in the future. Either ignore the warning, or use some other function, such as plt.plot()from matplotlib.pyplot.

+1
source

Source: https://habr.com/ru/post/1690089/


All Articles