-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
implement masked_arith_op to de-duplicate ops code #22182
Conversation
Codecov Report
@@ Coverage Diff @@
## master #22182 +/- ##
==========================================
+ Coverage 92.08% 92.08% +<.01%
==========================================
Files 169 169
Lines 50704 50695 -9
==========================================
- Hits 46691 46683 -8
+ Misses 4013 4012 -1
Continue to review full report at Codecov.
|
pandas/core/ops.py
Outdated
op : binary operator | ||
""" | ||
xrav = x.ravel() # 2D compat | ||
assert isinstance(x, (np.ndarray, ABCSeries)), type(x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we provide a more informative error message than just the type
of x
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment BTW applies to all of the assert
statements that you added.
looks ok, if you can comment a bit more, this consolidates a gnarly bit of code, which is full of special cases. and rebase. |
thanks |
ATM _arith_method_SERIES and _arith_method_FRAME have really similar fallback code. This de-duplicates those.
git diff upstream/master -u -- "*.py" | flake8 --diff