Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the Timestamp.day_of_year call to use the aliased Timestamp.dayofyear to work better with different versions of pandas #397

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/lib/evaluations/dmod/evaluations/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.0'
__version__ = '0.3.1'
4 changes: 2 additions & 2 deletions python/lib/evaluations/dmod/evaluations/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,9 @@ def __init__(
# is incremented by 1 to ensure that it matches in and out of leap years.
if isinstance(day, pandas.Timestamp):
if not day.is_leap_year and day >= datetime(day.year, month=3, day=1, tzinfo=day.tzinfo):
day = day.day_of_year + 1
day = day.dayofyear + 1
else:
day = day.day_of_year
day = day.dayofyear

self.__day = numpy.core.uint16(day)

Expand Down
Loading