Closes #5297: alignment tests for arkouda.numpy.generator #5299
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 random.Generator
Summary
This PR introduces a new NumPy alignment test suite for
ak.random.Generator, ensuring Arkouda’s RNG behavior remains consistent with NumPy where intended, and explicitly documenting known and intentional divergences.The new tests focus on:
xfailChanges
tests/numpy/alignment_verification/random_generator_alignment_test.pypytest.iniso it runs as part of the NumPy alignment suiteTest Coverage Details
Scalar delegation (exact match)
When
size is None, manyGeneratormethods delegate directly to NumPy.These tests assert exact agreement with
numpy.random.default_rngfor a fixed seed:randomuniformstandard_normalstandard_exponentialintegerslogisticstandard_gammapoissonThese tests act as high-sensitivity detectors for RNG stream misalignment.
Server-generated arrays (contract + sanity)
For calls with
sizeprovided:Documented limitations (xfail)
Two known issues are intentionally captured as
xfail:integersEncoding these as
xfailprevents regressions while clearly signaling future work.Why this matters
Follow-ups
Generator.integersto reject all floating-point dtypesTesting
Closes #5297: alignment tests for arkouda.numpy.generator