-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
implement maybe_wrap_in_index for EA Mixin dispatch #21715
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #21715 +/- ##
==========================================
+ Coverage 91.92% 91.93% +<.01%
==========================================
Files 158 158
Lines 49703 49708 +5
==========================================
+ Hits 45689 45698 +9
+ Misses 4014 4010 -4
Continue to review full report at Codecov.
|
…arrays-props-easy
@@ -1137,3 +1133,29 @@ def _ensure_datetimelike_to_i8(other): | |||
# period array cannot be coerces to int | |||
other = Index(other).asi8 | |||
return other | |||
|
|||
|
|||
def maybe_wrap_in_index(result, name=None, strict=True): |
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.
so this doesn't belong here, prob should just be in .base itself. why do you need the strict
parameter? that is really odd
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.
indexes.base
makes sense, sure.
The strict
parameter is there because most of the use cases don't have the try/except for the index wrapping. strict=False
is only passed for the comparison ops. I'll see if I can come up with something prettier. At least this has served its purpose of tagging the next few things to be moved.
Part of this PR is superseded by #21721. The other part is in limbo. Closing to clear the queue. |
Implements
maybe_wrap_in_index
, shows the easiest places where it can be used. If merged, the follow-on will be to move the affected methods to the EA mixin classes, leaving just the dispatch/wrapping behind.Implements
_local_timestamps
on theDatetimeArrayMixin
, since that will be needed before we can move the comparison operators among others.