mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-09-16 22:20:23 +00:00
Fix scale<=0 error in old numpy versions for constant histories
This commit is contained in:
parent
230b2ca6e0
commit
58173861b1
2 changed files with 2 additions and 2 deletions
|
|
@ -7,4 +7,4 @@
|
||||||
|
|
||||||
from fbprophet.forecaster import Prophet
|
from fbprophet.forecaster import Prophet
|
||||||
|
|
||||||
__version__ = '0.2'
|
__version__ = '0.2.dev'
|
||||||
|
|
|
||||||
|
|
@ -815,7 +815,7 @@ class Prophet(object):
|
||||||
if history['y'].min() == history['y'].max():
|
if history['y'].min() == history['y'].max():
|
||||||
# Nothing to fit.
|
# Nothing to fit.
|
||||||
self.params = stan_init()
|
self.params = stan_init()
|
||||||
self.params['sigma_obs'] = 0.
|
self.params['sigma_obs'] = 1e-9
|
||||||
for par in self.params:
|
for par in self.params:
|
||||||
self.params[par] = np.array([self.params[par]])
|
self.params[par] = np.array([self.params[par]])
|
||||||
elif self.mcmc_samples > 0:
|
elif self.mcmc_samples > 0:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue