WIP: remove python Series.nonzero warning (#931)

* add to_numpy()

* remove .values
This commit is contained in:
Ray Bell 2019-05-02 14:51:35 -04:00 committed by Ben Letham
parent d21b0cf4fd
commit f9adb9623e

View file

@ -896,7 +896,7 @@ class Prophet(object):
first = self.history['ds'].min()
last = self.history['ds'].max()
dt = self.history['ds'].diff()
min_dt = dt.iloc[dt.values.nonzero()[0]].min()
min_dt = dt.iloc[dt.to_numpy().nonzero()[0]].min()
# Yearly seasonality
yearly_disable = last - first < pd.Timedelta(days=730)