Closes #5294: alignment tests for arkouda.numpy.random.legacy#5296
Draft
ajpotts wants to merge 3 commits intoBears-R-Us:mainfrom
Draft
Closes #5294: alignment tests for arkouda.numpy.random.legacy#5296ajpotts wants to merge 3 commits intoBears-R-Us:mainfrom
ajpotts wants to merge 3 commits intoBears-R-Us:mainfrom
Conversation
f886047 to
1e7f3b4
Compare
1e7f3b4 to
978d7e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add NumPy-alignment tests for legacy random API (bool
randintdiscrepancy tracked)Summary
This PR adds a NumPy-alignment test suite covering Arkouda’s legacy random API, with an emphasis on:
RandomStateA known discrepancy in
randint(dtype=bool)error messages is intentionally captured and marked asxfail, so the suite documents the divergence without breaking CI.What’s included
tests/numpy/alignment_verification/random_legacy_alignment.pypytest.initest discoveryak.random.rand(scalar and multi-dimensional shapes)ak.random.randint(int64 bounds and shape semantics)ak.random.uniformak.random.standard_normal(distribution sanity checks)ak.random.randomNumPy alignment strategy
For
randint(dtype=bool), expected error messages are derived dynamically from:This avoids hard-coding fragile strings and ensures the tests track NumPy’s actual behavior.
Known discrepancy (xfail)
For
randint(dtype=bool)with negativelow:This mismatch is explicitly detected and marked with:
so CI remains green while preserving a clear signal that behavior differs from NumPy.
Why this matters
Follow-up
Once Arkouda’s
randint(dtype=bool)validation is updated to match NumPy’s error message, thexfailcan be removed and the test will pass automatically.Closes 5294: alignment tests for arkouda.numpy.random.legacy