Closes #5240: alignment tests for arkouda.numpy.manipulation_functions #5241
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.
PR: Add NumPy alignment tests for manipulation functions (flip/repeat/squeeze/tile)
Summary
This PR adds a new pytest module that verifies Arkouda’s
arkouda.numpy.manipulation_functionsAPIs match NumPy behavior for common and edge-case inputs. Specifically, it covers:flip(axis=None, single axis, multi-axis)repeat(axis=None, axis=int, per-axis repeats, error cases)squeeze(valid squeeze axes and invalid-axis error alignment)tile(variousrepsshapes and acceptance of list-likerepsconsistent with NumPy)The new test file is included in the test collection via
pytest.ini.Changes
tests/numpy/alignment_verification/manipulation_functions_alignment.pyto_ndarray()+np.array_equal/ shape checks for robust comparisonsrepeat, invalid squeeze axis)test_tile_accepts_list_reps_like_numpyto ensuretile(..., [2, 2])matchesnp.tilepytest.initestpathsMotivation
We already maintain alignment verification tests for operator behavior; this extends that approach to array manipulation functions. These tests help prevent regressions when backend implementations or API contracts evolve, and make intended NumPy parity explicit.
Notes / Considerations
@pytest.mark.skip_if_rank_not_compiled([2, 3])where appropriate, to respect builds that may not support certain ranks.tileaccepts list-likerepsin NumPy; the suite asserts that Arkouda matches that behavior.How to test
pytest -q tests/numpy/alignment_verification/manipulation_functions_alignment.py # or run the full numpy suite: pytest -q tests/numpyCloses #5240: alignment tests for arkouda.numpy.manipulation_functions