-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: Filter out StringDType
even when the backing array is not NumpyExtensionArray
#10559
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
946dd78
fix: keep dtype as `object` for `pd.StringDtype` in `safe_cast_to_index`
ilan-gold 147e3a7
chore: comment
ilan-gold 3cf92dd
fix: broader fix
ilan-gold 287e4be
feat: ban use of `pd.api.types.is_extension_array_dtype`
ilan-gold ffc905d
fix: type ignore
ilan-gold b97a64e
Merge branch 'main' into ig/fix_string_dtype
ilan-gold ed86c09
Update xarray/core/extension_array.py
ilan-gold 9ea9d8d
? mypy
ilan-gold d131442
Merge branch 'ig/fix_string_dtype' of github.com:ilan-gold/xarray int…
ilan-gold 7dc9662
fix: remove comment
ilan-gold 7343f6d
try blanket ignore
ilan-gold cc1776f
try blanket ignore again
ilan-gold 2e8ed67
fix: mypy
ilan-gold ac77713
use Any
ilan-gold 3ecc62f
Merge branch 'main' into ig/fix_string_dtype
ilan-gold c0b7b4c
Merge branch 'main' into ig/fix_string_dtype
ilan-gold bfbe244
chore: add comment
ilan-gold 594c164
Update xarray/core/utils.py
ilan-gold 0c6ba04
Merge branch 'ig/fix_string_dtype' of github.com:ilan-gold/xarray int…
ilan-gold a436d78
refactor: use is_allowed_extension_array more
ilan-gold 5e603a7
fix: remove one of the loops
ilan-gold a8d1aa1
Update xarray/computation/ops.py
ilan-gold bc27b15
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8172ae7
try again
dcherian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I didn't add
UNSUPPORTED_EXTENSION_ARRAY_TYPES
to the newis_allowed_extension_array
function because we do allow them as backing arrays toIndex
object, I think. Maybe should get a test?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.
I think we should merge these checks.
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.
I think we need to account for internal duck array support i.e., that which allows preserving the
dtype
of extension array indices that are in thisUNSUPPORTED_EXTENSION_ARRAY_TYPES
whitelist. See the note here:xarray/xarray/core/extension_array.py
Lines 101 to 103 in 5ce69b2
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.
Was that for DatetimeIndex? If so, clarifying that comment would be helpful.
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.
It would be for any index whose underlying array is one of the ones in
UNSUPPORTED_EXTENSION_ARRAY_TYPES
, so possibleDatetimeIndex
but also likely other ones as well