Skip to content

Conversation

@ajpotts
Copy link
Contributor

@ajpotts ajpotts commented Dec 5, 2025

PR Title

Implement elementwise equality (__eq__) for all Arkouda ExtensionArrays with full pandas compliance

Summary

This PR rewrites the __eq__ implementations for ArkoudaArray, ArkoudaStringArray, and ArkoudaCategoricalArray to ensure correct pandas ExtensionArray semantics. It introduces shape checks, scalar broadcasting, support for numpy arrays and Python sequences, and uniform boolean ExtensionArray return types.

Motivation

Prior behavior returned raw pdarrays and lacked length checks, causing inconsistent or incorrect behavior in pandas contexts. This update standardizes equality behavior and supports DataFrame filtering and boolean indexing reliably.

What's Included

  • New equality implementations with explicit type handling.
  • Length mismatch checks raising ValueError.
  • Boolean ArkoudaArray return values.
  • Improved string and categorical handling.
  • Comprehensive test coverage across numeric, string, and categorical arrays.

Why This Matters

  • Aligns Arkouda with pandas EA protocol.
  • Enables correct DataFrame filtering and boolean logic.
  • Provides consistent semantics across all ExtensionArrays.
  • Removes surprising and inconsistent prior behaviors.

Closes #5122: ArkoudaExtensionArray.eq

@ajpotts ajpotts force-pushed the 5122_ArkoudaExtensionArray.__eq__ branch from 15a6a2d to 8df8655 Compare December 5, 2025 13:39
@ajpotts ajpotts marked this pull request as ready for review December 5, 2025 13:42
@ajpotts ajpotts marked this pull request as draft December 5, 2025 14:12
@ajpotts ajpotts force-pushed the 5122_ArkoudaExtensionArray.__eq__ branch from 8df8655 to 7616a99 Compare December 5, 2025 14:41
@ajpotts ajpotts marked this pull request as ready for review December 5, 2025 16:20
Copy link
Collaborator

@1RyanK 1RyanK left a comment

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 5122_ArkoudaExtensionArray.__eq__ branch from 7616a99 to e1e0430 Compare December 16, 2025 14:33
@ajpotts ajpotts force-pushed the 5122_ArkoudaExtensionArray.__eq__ branch from 88d01fb to 1cc81e6 Compare December 18, 2025 21:17
@ajpotts ajpotts enabled auto-merge December 24, 2025 12:42
@ajpotts ajpotts disabled auto-merge December 24, 2025 13:06
@ajpotts ajpotts merged commit 1d81580 into Bears-R-Us:main Dec 24, 2025
20 of 21 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.

ArkoudaExtensionArray.__eq__

2 participants