Skip to content

REF: implement array_algos.take #39948

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 4 commits into from
Feb 23, 2021
Merged

Conversation

jbrockmendel
Copy link
Member

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

@jreback
Copy link
Contributor

jreback commented Feb 21, 2021

if you can rebase

@jbrockmendel
Copy link
Member Author

rebased + green

@jreback jreback added the Refactor Internal refactoring of code label Feb 22, 2021
@jreback
Copy link
Contributor

jreback commented Feb 22, 2021

maybe just more all of algorithms.py to array_algos? though i think these should probably be in somewhat separated modules rather than one giant one. so ok with moveing take but let's put it separate as its pretty meaty by itself.

@jbrockmendel
Copy link
Member Author

maybe just more all of algorithms.py to array_algos?

there are some that depend on Index/Series, so they dont all fit


return func2


def take(
Copy link
Contributor

Choose a reason for hiding this comment

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

how are we not moving this?

Copy link
Member Author

Choose a reason for hiding this comment

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

its high-level and i dont want to futz with updating imports everywhere else

@jreback jreback added this to the 1.3 milestone Feb 23, 2021
@jreback jreback merged commit 161e365 into pandas-dev:master Feb 23, 2021
@jreback
Copy link
Contributor

jreback commented Feb 23, 2021

k thanks

if fill_value is lib.no_default:
fill_value = na_value_for_dtype(arr.dtype, compat=False)

arr = extract_array(arr, 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.

"array algos" should only deal with arrays IMO

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, will fix in follow-up

@jbrockmendel jbrockmendel deleted the ref-take branch February 23, 2021 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants