Browse Source

Fix scale<=0 error in old numpy versions for constant histories

Ben Letham 7 years ago
parent
commit
58173861b1
2 changed files with 2 additions and 2 deletions
  1. 1 1
      python/fbprophet/__init__.py
  2. 1 1
      python/fbprophet/forecaster.py

+ 1 - 1
python/fbprophet/__init__.py

@@ -7,4 +7,4 @@
 
 from fbprophet.forecaster import Prophet
 
-__version__ = '0.2'
+__version__ = '0.2.dev'

+ 1 - 1
python/fbprophet/forecaster.py

@@ -815,7 +815,7 @@ class Prophet(object):
         if history['y'].min() == history['y'].max():
             # Nothing to fit.
             self.params = stan_init()
-            self.params['sigma_obs'] = 0.
+            self.params['sigma_obs'] = 1e-9
             for par in self.params:
                 self.params[par] = np.array([self.params[par]])
         elif self.mcmc_samples > 0: