-
-
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
(fix): extension array indexers #9671
base: main
Are you sure you want to change the base?
Conversation
…ore/variable.py to use any-precision datetime/timedelta with autmatic inferring of resolution
…ocessing, raise now early
…t resolution, fix code and tests to allow this
for more information, see https://pre-commit.ci
… more carefully, for now using pd.Series to covert `OMm` type datetimes/timedeltas (will result in ns precision)
…rray` series creating an extension array when `.array` is accessed
Unfortunately I'm not able to review all changes related to datetime types, but I just wanted to note that the changes in Any blocker apart from the CI failures and merge conflicts? Doctest errors should be trivial to fix (although looking at the errors this makes me think that pandas Extension types might cause some rendering issues of Xarray variable inline reprs, depending on how long the reprs of the extension types can be). |
# Conflicts: # xarray/tests/test_variable.py
The reason I created my PR on top of yours was that I spent many hours trying to do what you did, but much worse. The issue is that datetime + extension array permissibility are quite interconnected. |
@kmuehlbauer If you fix the merge conflicts with |
Thanks @ilan-gold for the details. I've fixed the conflicts over in #9618. Would be great to get this over the line soon :-) |
@benbovy Cleaner diff over in https://github.com/kmuehlbauer/xarray/pull/1/files |
Thanks @ilan-gold. After a brief look it looks like kmuehlbauer#1 could be opened here as a separate PR targeting |
@benbovy Is that not what this PR is? |
I was actually referring to #9671 (comment), but waiting for #9618 to be merged may be fine too I guess. The cleaner diff over in https://github.com/kmuehlbauer/xarray/pull/1/files makes the review easier although CI here still mixes those changes with #9618. |
Yeah, it's unfortunate but so many datetime indexers are passed through now and left untouched as a result of the changes here that I either had to restrict the datetime types one-by-one where they pop up or re implement the entirety of #9618 anyway to loosen the restriction globally. |
Everything working except small mypy stuff and a weird test or two that seem dependent on python version: 8a3e834 I will be on vacation for two-ish weeks starting tomorrow but this PR is probably reviewable, at least in hte other repo and I am happy to work on it as soon as I'm back. |
Identical to kmuehlbauer#1 - probably not very helpful in terms of changes since https://github.com/kmuehlbauer/xarray/tree/any-time-resolution-2 contains most of it....
whats-new.rst
api.rst