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

Adds list.take, python binding for cudf::lists::segmented_gather #7591

Merged
merged 9 commits into from
Mar 18, 2021

Conversation

isVoid
Copy link
Contributor

@isVoid isVoid commented Mar 13, 2021

Closes #7465

Implements ListColumn.list.take based on cudf::lists:segmented_gather. Gather elements inside each list based on the provided positions. Example:

>>> s = cudf.Series([[1, 2, 3], [4, 5]])
>>> s
0    [1, 2, 3]
1       [4, 5]
dtype: list
>>> s.list.take([[2, 1], [1, 0]])
0    [3, 2]
1    [5, 4]
dtype: list

@github-actions github-actions bot added the Python Affects Python cuDF API. label Mar 13, 2021
@isVoid isVoid changed the title Python binding for segment_gather Python list.take, binding for cudf::lists::segment_gather Mar 15, 2021
@isVoid isVoid changed the title Python list.take, binding for cudf::lists::segment_gather Python list.take, binding for cudf::list::segment_gather Mar 15, 2021
@isVoid isVoid changed the title Python list.take, binding for cudf::list::segment_gather Python list.take, binding for cudf::lists::segment_gather Mar 15, 2021
@isVoid isVoid changed the title Python list.take, binding for cudf::lists::segment_gather Python list.take, binding for cudf::lists::segmented_gather Mar 15, 2021
@isVoid isVoid self-assigned this Mar 15, 2021
@isVoid isVoid added 3 - Ready for Review Ready for review by team feature request New feature or request non-breaking Non-breaking change labels Mar 15, 2021
@isVoid isVoid marked this pull request as ready for review March 15, 2021 18:17
@isVoid isVoid requested a review from a team as a code owner March 15, 2021 18:17
@isVoid isVoid changed the title Python list.take, binding for cudf::lists::segmented_gather Adds list.take, python binding for cudf::lists::segmented_gather Mar 15, 2021
python/cudf/cudf/core/column/lists.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/column/lists.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/column/lists.py Outdated Show resolved Hide resolved
python/cudf/cudf/core/column/lists.py Show resolved Hide resolved
python/cudf/cudf/_lib/copying.pyx Show resolved Hide resolved
python/cudf/cudf/tests/test_list.py Outdated Show resolved Hide resolved
@isVoid isVoid requested a review from kkraus14 March 15, 2021 20:15
@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #7591 (d717116) into branch-0.19 (7871e7a) will increase coverage by 0.14%.
The diff coverage is 93.15%.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.19    #7591      +/-   ##
===============================================
+ Coverage        81.86%   82.01%   +0.14%     
===============================================
  Files              101      101              
  Lines            16884    17008     +124     
===============================================
+ Hits             13822    13949     +127     
+ Misses            3062     3059       -3     
Impacted Files Coverage Δ
python/cudf/cudf/core/index.py 92.86% <ø> (ø)
python/cudf/cudf/core/column/column.py 87.77% <60.00%> (+0.01%) ⬆️
python/cudf/cudf/core/column/numerical.py 94.83% <85.71%> (-0.20%) ⬇️
python/cudf/cudf/core/frame.py 89.00% <89.18%> (-0.02%) ⬇️
python/cudf/cudf/core/column/decimal.py 92.75% <91.30%> (-2.12%) ⬇️
python/cudf/cudf/core/column/lists.py 91.81% <94.73%> (+0.42%) ⬆️
python/cudf/cudf/core/dataframe.py 90.45% <95.00%> (-0.01%) ⬇️
python/cudf/cudf/core/series.py 91.25% <96.15%> (+0.47%) ⬆️
python/cudf/cudf/core/column/string.py 86.58% <100.00%> (+0.08%) ⬆️
python/cudf/cudf/core/column_accessor.py 95.28% <100.00%> (-0.03%) ⬇️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c4fa28...d717116. Read the comment docs.

Co-authored-by: Keith Kraus <keith.j.kraus@gmail.com>
@kkraus14
Copy link
Collaborator

rerun tests

@kkraus14
Copy link
Collaborator

rerun tests

@kkraus14
Copy link
Collaborator

@gpucibot merge

@kkraus14 kkraus14 added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Mar 17, 2021
@rapids-bot rapids-bot bot merged commit 951b455 into rapidsai:branch-0.19 Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge feature request New feature or request non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Python bindings for lists::segmented_gather
3 participants