Closes #5278: alignment tests for arkouda.numpy.segarray #5284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SegArray NumPy Alignment Test Suite
Summary
This PR adds and refines a NumPy alignment test suite for
SegArray, exercising behavior againstwell-defined NumPy-style reference semantics. The goal is to clearly distinguish:
xfail)This improves test coverage while avoiding false negatives.
What’s Included
1. SegArray alignment tests
New/expanded tests in:
cover:
concat)unique)intersect,union,setdiff,setxor)sum, etc.)Each test compares Arkouda results against a NumPy-style reference implementation.
Known Issues Marked as
xfailThe following behaviors are currently known issues and are explicitly marked as expected failures:
A. String concatenation
SegArray.concat(axis=1)fails for string dtypeB.
unique()with empty segmentsSegArray.unique()fails or errors when empty segments are presentC. Set-ops constructing invalid segments
ValueError: Segments must be unique and in sorted orderD. Set-ops ordering mismatch vs NumPy
E. Aggregations drop empty segments
SegArray.sum()(and similar) drop empty segmentssum([]) == 0)All of the above are documented inline with
pytest.xfail(...)and explanatory messages.Why This PR Is Useful
Follow-up Work (Out of Scope)
Notes for Reviewers
xfails are narrow and intentionalxfailshould be paired with a corresponding fixCloses #5278: alignment tests for arkouda.numpy.segarray