|
@@ -490,6 +490,8 @@ class Prophet(object):
|
|
raise Exception('Prophet object can only be fit once. '
|
|
raise Exception('Prophet object can only be fit once. '
|
|
'Instantiate a new object.')
|
|
'Instantiate a new object.')
|
|
history = df[df['y'].notnull()].copy()
|
|
history = df[df['y'].notnull()].copy()
|
|
|
|
+ if np.isinf(history['y'].values).any():
|
|
|
|
+ raise ValueError('Found infinity in column y.')
|
|
self.history_dates = pd.to_datetime(df['ds']).sort_values()
|
|
self.history_dates = pd.to_datetime(df['ds']).sort_values()
|
|
|
|
|
|
history = self.setup_dataframe(history, initialize_scales=True)
|
|
history = self.setup_dataframe(history, initialize_scales=True)
|