Skip to content

Commit

Permalink
Use left-only inclusiveness for pd.date_range
Browse files Browse the repository at this point in the history
The `closed` parameter is deprecated in pandas==1.4.0, in favor of the `inclusive` parameter. See https://pandas.pydata.org/docs/reference/api/pandas.date_range.html
  • Loading branch information
victorlin committed Jun 1, 2022
1 parent 446b39d commit 1487790
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion augur/frequency_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def get_pivots(observations, pivot_interval, start_date=None, end_date=None, piv
datetime_pivots = pd.date_range(
float_to_datestring(pivot_start),
float_to_datestring(pivot_end),
freq = offset
freq = offset,
closed="left"
)
pivots = np.array([timestamp_to_float(pivot) for pivot in datetime_pivots])

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"jsonschema >=3.0.0, ==3.*",
"networkx >= 2.5, ==2.*",
"packaging >=19.2",
"pandas >=1.0.0, ==1.*",
"pandas <1.4.0, ==1.*",
"phylo-treetime ==0.8.*",
"xopen >=1.0.1, ==1.*"
],
Expand Down

0 comments on commit 1487790

Please sign in to comment.