Skip to content

Closes #5252: alignment tests for arkouda.numpy.dtypes - #5254

Merged
ajpotts merged 3 commits into
Bears-R-Us:mainfrom
ajpotts:5252_alignment_tests_for_arkouda.numpy.dtypes
Feb 13, 2026
Merged

ajpotts merged 3 commits into
Bears-R-Us:mainfrom
ajpotts:5252_alignment_tests_for_arkouda.numpy.dtypes

Conversation

@ajpotts

@ajpotts ajpotts commented Jan 7, 2026 •

Copy link
Copy Markdown
Contributor

Add NumPy alignment tests for dtypes and unary ufuncs

Summary

This PR introduces a new NumPy-alignment verification test suite for Arkouda dtypes and selected unary ufuncs. The goal is to explicitly codify current behavior, surface gaps vs NumPy semantics, and provide a structured place to track alignment progress over time.

What’s Included

  • New test file: tests/numpy/alignment_verification/dtypes_alignment.py
  • Adds coverage for:
    • ak.dtype (string specs, Python scalars, bigint threshold)
    • resolve_scalar_dtype
    • can_cast (including NumPy parity checks)
    • result_type (including bigint vs float precedence)
    • get_byteorder
    • Unary ufunc alignment scaffold (absolute, negative, floor, ceil)
  • Registers the new test file in pytest.ini

Notable Design Decisions

  • Bigint handling: ak.result_type is asserted to return dtype("bigint"), matching NumPy’s result_type contract of returning a dtype, not a Python type.
  • Unary ufunc gaps:
    • ak.floor / ak.ceil are marked as xfail for integer inputs.
    • NumPy supports integer inputs for these ufuncs; Arkouda currently restricts them to floats.
    • A follow-up issue tracks this gap explicitly.

Related Issue

  • Support integer inputs for ak.floor / ak.ceil (NumPy alignment)

Why This Matters

  • Makes Arkouda’s current dtype semantics explicit and testable
  • Prevents silent regressions in dtype promotion and casting logic
  • Provides a clear, incremental path toward tighter NumPy compatibility

Testing

pytest tests/numpy/alignment_verification/dtypes_alignment.py

All existing tests continue to pass; new failures are limited to intentional xfails that document known gaps.

Closes #5252: alignment tests for arkouda.numpy.dtypes

@ajpotts
ajpotts force-pushed the 5252_alignment_tests_for_arkouda.numpy.dtypes branch 3 times, most recently from 1cbeadd to 73679c0 Compare January 8, 2026 22:57
@codecov-commenter

Copy link
Copy Markdown

⚠️ 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     #5254   +/-   ##
========================================
  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.

@ajpotts
ajpotts force-pushed the 5252_alignment_tests_for_arkouda.numpy.dtypes branch from b31f9fb to 6d19aac Compare February 10, 2026 12:21
@ajpotts
ajpotts marked this pull request as ready for review February 10, 2026 12:21

@1RyanK 1RyanK 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.

Looks good!

@ajpotts
ajpotts force-pushed the 5252_alignment_tests_for_arkouda.numpy.dtypes branch from e164d8a to 243fe38 Compare February 12, 2026 18:23
@ajpotts
ajpotts merged commit a519422 into Bears-R-Us:main Feb 13, 2026
19 checks passed
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.dtypes

4 participants