Skip to content

REF: avoid getattr pattern for diff_2d; use fused types #29120

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 3 commits into from
Oct 22, 2019

Conversation

jbrockmendel
Copy link
Member

No description provided.


for name, c_type, dest_type, in dtypes:
yield name, c_type, dest_type
ctypedef fused diff_t:
Copy link
Contributor

Choose a reason for hiding this comment

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

isn’t this numeric? can we consolidate these later

Copy link
Member Author

Choose a reason for hiding this comment

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

i hope so

@jbrockmendel jbrockmendel changed the title REF: use fused types for diff_2d REF: avoid getattr pattern for diff_2d; use fused types Oct 21, 2019
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@WillAyd WillAyd added the Clean label Oct 22, 2019
@WillAyd WillAyd added this to the 1.0 milestone Oct 22, 2019

# Disable for unsupported dtype combinations,
# see https://github.com/cython/cython/issues/2646
if out_t is float32_t:
Copy link
Contributor

Choose a reason for hiding this comment

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

assume this a later followup

@jreback jreback merged commit 1c6d5ec into pandas-dev:master Oct 22, 2019
@jreback
Copy link
Contributor

jreback commented Oct 22, 2019

thanks

@jbrockmendel jbrockmendel deleted the cycommon branch October 22, 2019 15:08
raise NotImplementedError
else:
if (diff_t is float32_t or diff_t is int8_t or diff_t is int16_t):
raise NotImplementedError
Copy link
Member Author

Choose a reason for hiding this comment

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

@WillAyd you may have noticed a bunch of build warnings about unreachable code have started showing up. I'm pretty sure this is the reason. Any thoughts on more graceful ways to get the combination of dtypes we're interested in? (see the GH link on L27)

The same dtype-combination thing is the only reason why algos_take_helper isn't converted to fused types; it'd be really nice to clear that up

Copy link
Member

Choose a reason for hiding this comment

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

Don't know off the top of my head - maybe an Enum using the type as a member?

HawkinsBA pushed a commit to HawkinsBA/pandas that referenced this pull request Oct 29, 2019
Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
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.

3 participants