-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
PERF: Add var to masked arrays #48379
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
Conversation
# Conflicts: # pandas/core/array_algos/masked_reductions.py # pandas/core/arrays/masked.py # pandas/tests/reductions/test_reductions.py
@@ -787,6 +787,15 @@ def test_mean_masked_overflow(self): | |||
assert result_masked - result_numpy == 0 | |||
assert result_masked == 1e17 | |||
|
|||
def test_var_masked_array(self): |
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.
Could you parameterize over ddof=[0, 1]
?
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.
added
Co-authored-by: Matthew Roeschke <[email protected]>
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.
LGTM. Can merge on green after the merge conflict is resolved
# Conflicts: # doc/source/whatsnew/v1.6.0.rst
This patch may have induced a potential regression. Please check the links below. If any ASVs are parameterized, the combinations of parameters that a regression has been detected appear as subbullets. This is a partially automated message.
|
Here is a more direct link (still need to workout how to incorporate parameterizations in the link): |
Hm guess boolean is special casy here. We could cast the array to float, this would get most of the regression back, but not sure if this is worth it |
Taking the variance of Booleans seems pretty rare to me, but at the same time, the solution sounds very easy. I'm thinking to at least open a tracking issue. |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.