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

SegArray.filter() Incorrect Behavior with Empty Segments #2666

Closed
Ethan-DeBandi99 opened this issue Aug 15, 2023 · 0 comments · Fixed by #2860
Closed

SegArray.filter() Incorrect Behavior with Empty Segments #2666

Ethan-DeBandi99 opened this issue Aug 15, 2023 · 0 comments · Fixed by #2860
Assignees
Labels
bug Something isn't working

Comments

@Ethan-DeBandi99
Copy link
Contributor

SegArray.filter() appears to be dropping the segments that are empty before filtering. Empty segments resulting from the filter are handled properly.

# NOTE - uses function to build segarray components used in testing
a, b = self.build_repeat_filter_data(dtype)
segments = ak.array([0, len(a), len(a), len(a), len(a)+len(b)])
flat = ak.array(a + b)
sa = ak.SegArray(segments, flat)
result = sa.filter(3)
@Ethan-DeBandi99 Ethan-DeBandi99 added the bug Something isn't working label Aug 15, 2023
@stress-tess stress-tess self-assigned this Sep 8, 2023
stress-tess pushed a commit to stress-tess/arkouda that referenced this issue Nov 24, 2023
This PR (fixes Bears-R-Us#2666) fixes a bug where segarray.filter always dropped empty segments
stress-tess pushed a commit to stress-tess/arkouda that referenced this issue Nov 24, 2023
This PR (fixes Bears-R-Us#2661) fixes a bug in `segarray.remove_repeats` handling of empty segments. This was a very similar problem as in Bears-R-Us#2666
github-merge-queue bot pushed a commit that referenced this issue Dec 6, 2023
This PR (fixes #2666) fixes a bug where segarray.filter always dropped empty segments

Co-authored-by: Pierce Hayes <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Dec 6, 2023
This PR (fixes #2661) fixes a bug in `segarray.remove_repeats` handling of empty segments. This was a very similar problem as in #2666

Co-authored-by: Pierce Hayes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants