-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: remove _maybe_update_attributes #27896
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
def __neg__(self): | ||
if self.freq is not None: | ||
return type(self)(-self._data, freq=-self.freq) | ||
return type(self)(-self._data) | ||
|
||
def __pos__(self): | ||
return type(self)(self._data, freq=self.freq) |
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.
This is new? Or where was it done before?
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.
In _add_numeric_methods_unary
.
@@ -163,6 +164,20 @@ def values(self): | |||
def asi8(self): | |||
return self._data.asi8 | |||
|
|||
def __array_wrap__(self, result, context=None): |
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.
sidenote (not for this PR): we should move to __array_ufunc__
here instead
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.
agreed on this, can you create an issue @jbrockmendel
def __neg__(self): | ||
if self.freq is not None: | ||
return type(self)(-self._data, freq=-self.freq) | ||
return type(self)(-self._data) | ||
|
||
def __pos__(self): | ||
return type(self)(self._data, freq=self.freq) |
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.
In _add_numeric_methods_unary
.
can you rebase |
Took a glance at the ASV portal this might have caused a lot of performance regressions: https://pandas.pydata.org/speed/pandas/#/regressions @jbrockmendel do you have a quick way of validating that? |
Not a quick way, no. I'll take a look, but likely won't get to it today. |
Oh yea no rush - thanks! |
Might have misread but thought that was the commit that preceded this one on master
…Sent from my iPhone
On Oct 18, 2019, at 7:06 PM, jbrockmendel ***@***.***> wrote:
@WillAyd looking at this it isn't obvious which regressions you think may have been caused here. I see a bunch from August 15 linking to 15b11c8; are those the ones you have in mind?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
It's indeed this commit that asv reports for the biggest regressions. But there was also a gap in asv runs between August 2 and this commit (August 15), so probably it can be anything in that window |
@TomAugspurger it also seems that the last runs were in September? |
Will check today. We had some issues with a bad ASV env failing builds.
… On Oct 19, 2019, at 07:05, Joris Van den Bossche ***@***.***> wrote:
@TomAugspurger it also seems that the last runs were in September?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
It is only non-trivial for DTI and TDI, and only actually needed in
__array_wrap__
. It is cleaner to implement the relevant patch inDatetimeIndexOpsMixin.__array_wrap__
and avoid the need for maybe_update_attributes altogether.