Closes #5294: alignment tests for arkouda.numpy.random.legacy #5296
+148
−0
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