Skip to content

Conversation

jbrockmendel
Copy link
Member

No description provided.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @jbrockmendel

f = getattr(np, arg, None)
if f is not None:
try:
if hasattr(self, "__array__"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to account for __array_ufunc__ or __array_function__ here as well? @TomAugspurger might want to take a look

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, this change is OK since we're checking if self has __array__, which our Index / Series objects have (in addition to array_ufunc)

plot = property(GroupByPlot)

def _make_wrapper(self, name):
if name not in self._apply_whitelist:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup. At a glance this looks like a pretty interesting factory...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah, this used to be called from within __gettattr__ (and exec was involved) Recently changed to be called from properties generated directly from apply_whitelist, so this check is no longer necessary

@jreback jreback added this to the 1.0 milestone Oct 16, 2019
@jreback jreback merged commit 0a108f0 into pandas-dev:master Oct 16, 2019
@jreback
Copy link
Contributor

jreback commented Oct 16, 2019

thanks

@jbrockmendel jbrockmendel deleted the faster43 branch October 16, 2019 15:25
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
bongolegend pushed a commit to bongolegend/pandas that referenced this pull request Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants