-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add time_unit
argument to CFTimeIndex.to_datetimeindex
#9965
Add time_unit
argument to CFTimeIndex.to_datetimeindex
#9965
Conversation
1732fa7
to
aad1c76
Compare
f421467
to
6e49c2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for taking care of the CFTimeIndex changes. It looks really complete 🚀. Just some more minor typing which could be added.
Co-authored-by: Kai Mühlbauer <kmuehlbauer@wradlib.org>
Co-authored-by: Kai Mühlbauer <kmuehlbauer@wradlib.org>
Co-authored-by: Kai Mühlbauer <kmuehlbauer@wradlib.org>
Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
Is the mypy error related, as it doesn't show up in other CI runs? |
I was too eager suggestion typing enhancements. I've removed the erroneous typing for the internal function for now. |
Ok, let's move on here! Thanks @spencerkclark! |
Per #9618 (comment), this PR adds a
time_unit
keyword argument toCFTimeIndex.to_datetimeindex
. The default isNone
, which currently means the dates will be converted to nanosecond-resolutionnp.datetime64
values, but aFutureWarning
is raised indicating that this will eventually be switched to return microsecond-precisionnp.datetime64
values.cc: @dcherian @kmuehlbauer
whats-new.rst