mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-21 09:15:36 +00:00
Fix holiday window validation when NaNs are present
This commit is contained in:
parent
7b9acd953f
commit
967a17bb4e
1 changed files with 2 additions and 2 deletions
|
|
@ -158,9 +158,9 @@ class Prophet(object):
|
||||||
raise ValueError('Holidays must have both lower_window and ' +
|
raise ValueError('Holidays must have both lower_window and ' +
|
||||||
'upper_window, or neither')
|
'upper_window, or neither')
|
||||||
if has_lower:
|
if has_lower:
|
||||||
if max(self.holidays['lower_window']) > 0:
|
if self.holidays['lower_window'].max() > 0:
|
||||||
raise ValueError('Holiday lower_window should be <= 0')
|
raise ValueError('Holiday lower_window should be <= 0')
|
||||||
if min(self.holidays['upper_window']) < 0:
|
if self.holidays['upper_window'].min() < 0:
|
||||||
raise ValueError('Holiday upper_window should be >= 0')
|
raise ValueError('Holiday upper_window should be >= 0')
|
||||||
for h in self.holidays['holiday'].unique():
|
for h in self.holidays['holiday'].unique():
|
||||||
self.validate_column_name(h, check_holidays=False)
|
self.validate_column_name(h, check_holidays=False)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue