Skip to content

Conversation

@ajpotts
Copy link
Contributor

@ajpotts ajpotts commented Jan 9, 2026

Add NumPy alignment test suite for pdarray set operations

Summary

This PR adds a comprehensive NumPy-alignment test suite for Arkouda pdarray set operations, covering:

  • in1d
  • union1d
  • intersect1d
  • setdiff1d
  • setxor1d
  • concatenate
  • indexof1d
  • multi-array (row-wise) set operations

The goal is to explicitly verify semantic alignment with NumPy behavior and to surface existing deviations in a controlled, well-documented way.

What’s included

  • New test file:
    • tests/numpy/alignment_verification/pdarraysetops_alignment.py
  • Test coverage added to pytest.ini so the suite runs as part of standard alignment verification.
  • Careful handling of assume_unique=True cases:
    • Inputs are explicitly uniqued before calling Arkouda, matching NumPy’s contract.
  • Multi-array set operations validated using NumPy structured arrays as a reference model.

Known issues (documented via xfail)

Why this matters

  • Establishes a clear, executable contract between Arkouda and NumPy for set operations.
  • Prevents regressions as internal implementations evolve.
  • Separates test correctness issues (e.g., misuse of assume_unique) from real semantic gaps in Arkouda.

Follow-up work

  • Fix ak.union1d empty-input fast paths to apply unique + sort.
  • Remove corresponding xfails once behavior matches NumPy.

Testing

  • All existing tests pass.
  • New alignment suite passes with expected xfails.

Closes #5272: alignment tests for arkouda.numpy.pdarraysetops

@ajpotts ajpotts force-pushed the 5272_alignment_tests_for_arkouda.numpy.pdarraysetops branch from 68918e2 to 26838e5 Compare January 9, 2026 12:40
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@8a95e0c). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##             main     #5274   +/-   ##
========================================
  Coverage        ?   100.00%           
========================================
  Files           ?        45           
  Lines           ?      1424           
  Branches        ?         0           
========================================
  Hits            ?      1424           
  Misses          ?         0           
  Partials        ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ajpotts ajpotts force-pushed the 5272_alignment_tests_for_arkouda.numpy.pdarraysetops branch from 26838e5 to 3d0ef27 Compare January 9, 2026 16:10
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.pdarraysetops

2 participants