-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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/CoW: is_range_indexer can't handle very large arrays #53672
Conversation
thx |
# GH53616 | ||
left = np.arange(0, 100, dtype=dtype) | ||
|
||
assert not lib.is_range_indexer(left, 2**31) |
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.
assert not lib.is_range_indexer(left, 2**31) | |
assert not lib.is_range_indexer(left, np.iinfo(np.int32).max) |
To fix the failing 32 bit build
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.
Thanks for the catch. I can't change the size here unfortunately (need it to be 2**31 == np.iinfo(np.int32).max + 1
to trigger the OverflowError previously).
Gonna skip on 32-bit instead, since the issue can't happen there.
(Max array len should be less than int32 max on 32-bit platforms).
Thanks @lithomas1 |
…53672) * BUG: is_range_indexer can't handle very large arrays * fix test on 32-bit
@lithomas1 thoughts about back porting this? This is potentially very annoying |
Yeah, for sure. I'll move the whatsnew in a bit then. |
@meeseeksdev backport 2.0.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
* CI: Build pandas even if doctests fail * BUG: groupby sum turning `inf+inf` and `(-inf)+(-inf)` into `nan` (#53623) * DEPR: method, limit in NDFrame.replace (#53492) * DEPR: method, limit in NDFrame.replace * update test, docs * suppress doctest warning * doctests * PERF: Series.str.get_dummies for ArrowDtype(pa.string()) (#53655) * PERF: Series.str.get_dummies for ArrowDtype(pa.string()) * whatsnew * typing * TYP: core.missing (#53625) * CI: Attempt to fix wheel builds (#53670) * DOC: Fixing EX01 - Added examples (#53647) * SeriesGroupBy.fillna example added * Added examples * Corrected failing test for timedelta.total_seconds * Corrected fillna example * CI/TST: Mark test_to_read_gcs as single_cpu (#53677) * BUG/CoW: is_range_indexer can't handle very large arrays (#53672) * BUG: is_range_indexer can't handle very large arrays * fix test on 32-bit * TST: Use more pytest fixtures --------- Co-authored-by: Yao Xiao <[email protected]> Co-authored-by: jbrockmendel <[email protected]> Co-authored-by: Luke Manley <[email protected]> Co-authored-by: Thomas Li <[email protected]> Co-authored-by: Dea María Léon <[email protected]>
…53672) * BUG: is_range_indexer can't handle very large arrays * fix test on 32-bit
* CI: Build pandas even if doctests fail * BUG: groupby sum turning `inf+inf` and `(-inf)+(-inf)` into `nan` (pandas-dev#53623) * DEPR: method, limit in NDFrame.replace (pandas-dev#53492) * DEPR: method, limit in NDFrame.replace * update test, docs * suppress doctest warning * doctests * PERF: Series.str.get_dummies for ArrowDtype(pa.string()) (pandas-dev#53655) * PERF: Series.str.get_dummies for ArrowDtype(pa.string()) * whatsnew * typing * TYP: core.missing (pandas-dev#53625) * CI: Attempt to fix wheel builds (pandas-dev#53670) * DOC: Fixing EX01 - Added examples (pandas-dev#53647) * SeriesGroupBy.fillna example added * Added examples * Corrected failing test for timedelta.total_seconds * Corrected fillna example * CI/TST: Mark test_to_read_gcs as single_cpu (pandas-dev#53677) * BUG/CoW: is_range_indexer can't handle very large arrays (pandas-dev#53672) * BUG: is_range_indexer can't handle very large arrays * fix test on 32-bit * TST: Use more pytest fixtures --------- Co-authored-by: Yao Xiao <[email protected]> Co-authored-by: jbrockmendel <[email protected]> Co-authored-by: Luke Manley <[email protected]> Co-authored-by: Thomas Li <[email protected]> Co-authored-by: Dea María Léon <[email protected]>
…53672) * BUG: is_range_indexer can't handle very large arrays * fix test on 32-bit
* CI: Build pandas even if doctests fail * BUG: groupby sum turning `inf+inf` and `(-inf)+(-inf)` into `nan` (pandas-dev#53623) * DEPR: method, limit in NDFrame.replace (pandas-dev#53492) * DEPR: method, limit in NDFrame.replace * update test, docs * suppress doctest warning * doctests * PERF: Series.str.get_dummies for ArrowDtype(pa.string()) (pandas-dev#53655) * PERF: Series.str.get_dummies for ArrowDtype(pa.string()) * whatsnew * typing * TYP: core.missing (pandas-dev#53625) * CI: Attempt to fix wheel builds (pandas-dev#53670) * DOC: Fixing EX01 - Added examples (pandas-dev#53647) * SeriesGroupBy.fillna example added * Added examples * Corrected failing test for timedelta.total_seconds * Corrected fillna example * CI/TST: Mark test_to_read_gcs as single_cpu (pandas-dev#53677) * BUG/CoW: is_range_indexer can't handle very large arrays (pandas-dev#53672) * BUG: is_range_indexer can't handle very large arrays * fix test on 32-bit * TST: Use more pytest fixtures --------- Co-authored-by: Yao Xiao <[email protected]> Co-authored-by: jbrockmendel <[email protected]> Co-authored-by: Luke Manley <[email protected]> Co-authored-by: Thomas Li <[email protected]> Co-authored-by: Dea María Léon <[email protected]>
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.I don't have enough RAM to test that this actually works.
(But the test raises
OverflowError
before, and doesn't raise after).