From ff65d1431f72a529ef3303c7ce0d032d7f4731f5 Mon Sep 17 00:00:00 2001 From: MT Date: Tue, 23 Oct 2018 12:02:43 -0700 Subject: [PATCH] Fix duplicate kwarg algorithm when newton fallback is selected (#708) * fix issue #700: duplicate kwarg algorithm * fix spacing * provide default to dict pop --- python/fbprophet/forecaster.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/fbprophet/forecaster.py b/python/fbprophet/forecaster.py index 7ed57c3..173ac3b 100644 --- a/python/fbprophet/forecaster.py +++ b/python/fbprophet/forecaster.py @@ -1048,6 +1048,7 @@ class Prophet(object): params = model.optimizing( dat, init=stan_init, iter=1e4, **kwargs) except RuntimeError: + kwargs.pop('algorithm', None) params = model.optimizing( dat, init=stan_init, iter=1e4, algorithm='Newton', **kwargs