-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Cover CategoricalIndex and EA edge cases #11310
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -914,7 +914,13 @@ def join( | |
| index = self.index.intersection(other.index) | ||
| if is_allowed_extension_array_dtype(index.dtype): | ||
| return type(self)(index, self.dim) | ||
| coord_dtype = np.result_type(self.coord_dtype, other.coord_dtype) | ||
| try: | ||
| coord_dtype = np.result_type(self.coord_dtype, other.coord_dtype) | ||
| except TypeError: | ||
| # pandas extension dtypes (e.g., CategoricalDtype) are not always | ||
| # compatible with numpy's type promotion even when the resulting | ||
| # index dtype is a regular NumPy dtype. | ||
| coord_dtype = get_valid_numpy_dtype(index) | ||
| return type(self)(index, self.dim, coord_dtype=coord_dtype) | ||
|
Comment on lines
915
to
924
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is this code reached give the above
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pydata/xarray Is there interest in codecov?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure quite sure what you mean by this. We already have codecov set up https://app.codecov.io/gh/pydata/xarray/pull/11310 (it just doesn't comment on PRs - which I like since I find the bot noisy)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I suppose I assumed it was not present. Good to know! I like it for exactly this reason, but now that I know it's here, I'll check :) |
||
|
|
||
| def reindex_like( | ||
|
|
||
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 would probably just outright error here.