Skip to content

PERF: avoid double-verify of take indices #40391

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
Mar 12, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Looks good! Small question on the added extract_array

@@ -3655,6 +3655,7 @@ class max_speed

self._consolidate_inplace()

indices = extract_array(indices, extract_numpy=True)
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed here? The manager method has an asarray(..) call anyway (to convert other array-likes such as a list, or EAs, etc, so that will also convert any Index or Series passed through)

Copy link
Member Author

Choose a reason for hiding this comment

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

leftover from an attempt at stronger annotating. theres at least one test where an Index makes it through to the Block method. will remove.

@jorisvandenbossche jorisvandenbossche added this to the 1.3 milestone Mar 12, 2021
@jorisvandenbossche jorisvandenbossche added Clean Internals Related to non-user accessible pandas implementation Performance Memory or execution speed performance labels Mar 12, 2021
@jorisvandenbossche jorisvandenbossche merged commit 2b2e9b6 into pandas-dev:master Mar 12, 2021
@jorisvandenbossche
Copy link
Member

Thanks!

@jbrockmendel jbrockmendel deleted the perf-take branch March 12, 2021 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Internals Related to non-user accessible pandas implementation Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants