Skip to content

CLN/REF: Unify Arithmetic Methods #27413

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 6 commits into from
Jul 20, 2019
Merged

Conversation

jbrockmendel
Copy link
Member

2 goals here.

First is to end up with a single implementation for our arithmetic ops. By implementing the missing methods directly on DTA/PA, we make it so we don't need to special-case inside the Index.__foo__ methods, so can dispatch to Series more directly.

Second is to get the wrapper defined in_arith_method_SERIES to the point where we can use it block-wise instead of column-wise, to address the recent perf issues. This makes progress towards that goal by tightening up the allowed types in masked_arith_op

Oh, and we also get rid of a usage of values_from_object, which is adjacent to #27165 and #27167

@TomAugspurger
Copy link
Contributor

Looks quite nice, thanks.

I think @jreback is fixing the numpy dev CI failure.

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Jul 16, 2019

Didn't look at the actual PR, but just to note: I think we should stop merging such cleaning / refactoring PRs before 0.25 (or already branch). Which goes for most of Brock's PRs (nothing personal, Brock, it is just that you are doing useful stuff that touches existing code ;))

@jreback jreback added the Compat pandas objects compatability with Numpy or Python functions label Jul 16, 2019
@jreback jreback added this to the 0.25.0 milestone Jul 16, 2019
@jreback
Copy link
Contributor

jreback commented Jul 16, 2019

Didn't look at the actual PR, but just to note: I think we should stop merging such cleaning / refactoring PRs before 0.25 (or already branch). Which goes for most of Brock's PRs (nothing personal, Brock, it is just that you are doing useful stuff that touches existing code ;))

well then we should branch / release. These are + PRs and to be honest if all of the tests pass I don't see a reason to not merge.

@jbrockmendel
Copy link
Member Author

we should stop merging such cleaning / refactoring PRs before 0.25 (or already branch).

+1

@jreback jreback modified the milestones: 0.25.0, 1.0 Jul 17, 2019
@jreback jreback merged commit 4dba140 into pandas-dev:master Jul 20, 2019
@jreback
Copy link
Contributor

jreback commented Jul 20, 2019

thanks @jbrockmendel nice code removal.

@jbrockmendel jbrockmendel deleted the marith branch July 20, 2019 20:08
quintusdias pushed a commit to quintusdias/pandas_dev that referenced this pull request Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants