Skip to content

Closes #5240: alignment tests for arkouda.numpy.manipulation_functions - #5241

Merged
ajpotts merged 1 commit into
Bears-R-Us:mainfrom
ajpotts:5240_alignment_tests_for_arkouda.numpy.manipulation_functions
Jan 16, 2026
Merged

ajpotts merged 1 commit into
Bears-R-Us:mainfrom
ajpotts:5240_alignment_tests_for_arkouda.numpy.manipulation_functions

Conversation

@ajpotts

@ajpotts ajpotts commented Jan 6, 2026 •

Copy link
Copy Markdown
Contributor

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_functions APIs 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 (various reps shapes and acceptance of list-like reps consistent with NumPy)

The new test file is included in the test collection via pytest.ini.

Changes

  • Add tests/numpy/alignment_verification/manipulation_functions_alignment.py
    • Parametrized coverage across a range of ranks/shapes
    • Uses to_ndarray() + np.array_equal / shape checks for robust comparisons
    • Validates expected exceptions (e.g., out-of-range axis for repeat, invalid squeeze axis)
    • Includes test_tile_accepts_list_reps_like_numpy to ensure tile(..., [2, 2]) matches np.tile
  • Update pytest.ini
    • Add the new alignment verification test file to testpaths

Motivation

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

  • Tests are marked with @pytest.mark.skip_if_rank_not_compiled([2, 3]) where appropriate, to respect builds that may not support certain ranks.
  • tile accepts list-like reps in 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/numpy

Closes #5240: alignment tests for arkouda.numpy.manipulation_functions

@ajpotts
ajpotts force-pushed the 5240_alignment_tests_for_arkouda.numpy.manipulation_functions branch 3 times, most recently from 20d5729 to 7b7b97a Compare January 7, 2026 13:17
@ajpotts
ajpotts force-pushed the 5240_alignment_tests_for_arkouda.numpy.manipulation_functions branch from 7b7b97a to 92e9329 Compare January 7, 2026 15:06
@ajpotts
ajpotts marked this pull request as ready for review January 7, 2026 15:48
@ajpotts
ajpotts marked this pull request as draft January 9, 2026 16:26

@drculhane drculhane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look straightforward. Nice work.

@ajpotts
ajpotts marked this pull request as ready for review January 13, 2026 20:27
@ajpotts
ajpotts added this pull request to the merge queue Jan 16, 2026
Merged via the queue into Bears-R-Us:main with commit 03aa4df Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alignment tests for arkouda.numpy.manipulation_functions

4 participants