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
ghost opened this issue Jul 19, 2019 · 2 comments · Fixed by #27826
Closed

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

ghost opened this issue Jul 19, 2019 · 2 comments · Fixed by #27826
Labels
Groupby Segfault Non-Recoverable Error
Milestone

Comments

@ghost
Copy link

ghost 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
Copy link
Member

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

@jbrockmendel jbrockmendel added the Segfault Non-Recoverable Error label Jul 19, 2019
@ghost
Copy link
Author

ghost commented Jul 19, 2019

Thanks for investigating

@jreback jreback added this to the 0.25.1 milestone Jul 24, 2019
TomAugspurger added a commit to TomAugspurger/pandas that referenced this issue Aug 8, 2019
Validate that q is between 0 and 1.

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

Validate that q is between 0 and 1.

Closes #27470

* prettier
quintusdias pushed a commit to quintusdias/pandas_dev that referenced this issue Aug 16, 2019
* BUG: Fix groupby quantile segfault

Validate that q is between 0 and 1.

Closes pandas-dev#27470

* prettier
WillAyd pushed a commit to WillAyd/pandas that referenced this issue Oct 31, 2019
* BUG: Fix groupby quantile segfault

Validate that q is between 0 and 1.

Closes pandas-dev#27470

* prettier
jreback pushed a commit that referenced this issue Oct 31, 2019
* Backport PR #27826 for 0.25.3 release

* BUG: Fix groupby quantile segfault

Validate that q is between 0 and 1.

Closes #27470

* prettier

* Backport PR #29173 for 0.25.3 release

* Backport PR #29296 for 0.25.3 release

* Backport PR #29294 for 0.25.3 whatsnew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby Segfault Non-Recoverable Error
Projects
None yet
2 participants