Skip to content

Conversation

@ajpotts
Copy link
Contributor

@ajpotts ajpotts commented Jan 9, 2026

Add NumPy Alignment Tests for pdarray Manipulation Functions

Summary

This PR adds a comprehensive NumPy alignment test suite for pdarray manipulation functions (hstack, vstack, append, and delete). The goal is to explicitly verify Arkouda behavior against NumPy for both successful operations and expected error cases, improving confidence in API compatibility and surfacing semantic mismatches early.

Key Changes

  • New alignment test suite
    • Added tests/numpy/alignment_verification/pdarraymanipulation_alignment.py
    • Covers 1D and 2D inputs, dtype promotion, NaN handling, axis semantics, and error behavior
    • Separates successful alignment cases from expected failure cases to match NumPy semantics
  • Test discovery
    • Registered the new test file in pytest.ini

Notable Alignment Decisions

  • vstack with mismatched 1D lengths:
    • NumPy raises ValueError
    • Arkouda currently raises a server-side RuntimeError
    • Tests assert semantic equivalence (both must raise), without over-constraining the exception type
  • Floating-point comparisons use assert_allclose(..., equal_nan=True) for NumPy-version stability

Why This Matters

  • Establishes a clear, executable contract between Arkouda and NumPy behavior
  • Makes regressions in shape, dtype, or axis handling immediately visible
  • Provides a pattern for future NumPy-alignment test suites

Closes #5269: alignment tests for arkouda.numpy.pdarraymanipulation

@ajpotts ajpotts force-pushed the 5269_alignment_tests_for_arkouda.numpy.pdarraymanipulation branch from 5385ede to efdaec3 Compare January 9, 2026 12:49
@codecov-commenter
Copy link

⚠️ 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@168089e). 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     #5270   +/-   ##
========================================
  Coverage        ?   100.00%           
========================================
  Files           ?         4           
  Lines           ?        63           
  Branches        ?         0           
========================================
  Hits            ?        63           
  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.

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.pdarraymanipulation

2 participants