Skip to content

Commit

Permalink
allow non-standard dates
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhallam committed Oct 20, 2023
1 parent d8e95f1 commit ef1daa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ license = "MIT"
name = "tablespoon"
readme = "README.md"
repository = "https://github.com/alexhallam/tablespoon"
version = "0.5.0"
version = "0.5.1"

[tool.poetry.dependencies]
numpy = "^1.23.0"
Expand Down
5 changes: 3 additions & 2 deletions tablespoon/forecasters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pandas as pd
import statsmodels.api as sm
from scipy.stats import norm

import warnings

def get_sorted_dates(df_historical):
"""
Expand Down Expand Up @@ -46,7 +46,7 @@ def check_historical_dates_are_contiguous(
remaining_dates = expected_dates.difference(given_dates)
# print(remaining_dates)
if len(check_dates) != len(history_dates):
raise Exception(
warning_message = (
"The series starts on "
+ str(min_date)
+ " and ends on "
Expand All @@ -57,6 +57,7 @@ def check_historical_dates_are_contiguous(
+ str(len(history_dates))
+ " was found "
)
warnings.warn(warning_message, UserWarning)


class Naive(object):
Expand Down

0 comments on commit ef1daa7

Please sign in to comment.