Skip to content
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

BUG: Groupby.quantile segfaults for quantile > 1 #27470

Closed
pilkibun opened this issue Jul 19, 2019 · 2 comments · Fixed by #27826

Comments

@pilkibun
Copy link
Contributor

commented Jul 19, 2019

Adding tests for #27467 surfaced some bugs:

from pandas import *
df = DataFrame(dict(a=[0, 0, 0, 1, 1, 1], b=range(6)))
g = df.groupby(np.repeat([0,1], 3))
# ok
g.quantile(50)
<segfault>

quantile accepts floats in [0,1] or arrays of floats. It appears not to validate the range though.

@jbrockmendel

This comment has been minimized.

Copy link
Member

commented Jul 19, 2019

Apparently this is platform specific. Works fine for me on OSX with numpy 1.16.4, segfaults on Ubuntu 18.04 with numpy 1.16.2

@pilkibun

This comment has been minimized.

Copy link
Contributor Author

commented Jul 19, 2019

Thanks for investigating

@jreback jreback added this to the 0.25.1 milestone Jul 24, 2019

@jreback jreback added the Groupby label Jul 24, 2019

TomAugspurger added a commit to TomAugspurger/pandas that referenced this issue Aug 8, 2019
BUG: Fix groupby quantile segfault
Validate that q is between 0 and 1.

Closes pandas-dev#27470
jbrockmendel added a commit that referenced this issue Aug 12, 2019
BUG: Fix groupby quantile segfault (#27826)
* BUG: Fix groupby quantile segfault

Validate that q is between 0 and 1.

Closes #27470

* prettier
quintusdias added a commit to quintusdias/pandas_dev that referenced this issue Aug 16, 2019
BUG: Fix groupby quantile segfault (pandas-dev#27826)
* BUG: Fix groupby quantile segfault

Validate that q is between 0 and 1.

Closes pandas-dev#27470

* prettier
gabriellm1 added a commit to gabriellm1/pandas that referenced this issue Aug 27, 2019
BUG: Fix groupby quantile segfault (pandas-dev#27826)
* BUG: Fix groupby quantile segfault

Validate that q is between 0 and 1.

Closes pandas-dev#27470

* prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.