Repository navigation
Closes #5230: ArkoudaExtensionArray arithmetic - #5231
Merged
ajpotts merged 3 commits intoJan 16, 2026
Merged
Conversation
ajpotts
force-pushed
the
5230_ArkoudaExtensionArray_arithmetic
branch
from
January 6, 2026 12:23
dd8d9a8 to
7357416
Compare
ajpotts
marked this pull request as ready for review
January 6, 2026 15:41
1RyanK
approved these changes
Jan 14, 2026
ajpotts
force-pushed
the
5230_ArkoudaExtensionArray_arithmetic
branch
from
January 15, 2026 09:47
7357416 to
774ac07
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5231 +/- ##
========================================
Coverage ? 100.00%
========================================
Files ? 4
Lines ? 63
Branches ? 0
========================================
Hits ? 63
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
drculhane
approved these changes
Jan 15, 2026
drculhane
left a comment
Contributor
There was a problem hiding this comment.
It looks as if this allows all numerical types (I tested it manually with ak.float64, ak.int64, ak.uint64 and ak.bool_). Typically we parametrize the tests to include all types. Is that not needed here?
ajpotts
enabled auto-merge
January 15, 2026 19:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable pandas arithmetic dispatch for Arkouda ExtensionArray
Summary
This PR implements the pandas
ExtensionArrayarithmetic hook (_arith_method) forArkoudaExtensionArray, enabling elementwise arithmetic operations (e.g.+,-,*)between Arkouda-backed arrays and with scalars.
Motivation
Pandas does not automatically dispatch Python operators (
__add__, etc.) forExtensionArrays. Instead, arithmetic is routed through
_arith_method. Without thishook, expressions like:
raise
TypeError.Implementing
_arith_methodis required for:Series/DataFramearithmeticWhat’s in this PR
Core functionality
_arith_methodtoArkoudaExtensionArrayNotImplementedfor unsupported operand types_from_dataconstructor helper for mypy-safe instance creation_dataattribute for static typingTyping & correctness
typing_extensions.Selffor precise self-type returnsNotImplementedType(not the value) in return annotationsTests
NotImplementedpropagationTypeErrorbehavior for unsupported operandsargsort/ NaN placement tests remain unchanged and passingDesign notes
before calling into the ExtensionArray.
operations.
operator overloading.
Example
Reviewer notes
_from_datahelper is intentionally minimal and centralizes EA construction.hasattr(other, "_data")) is used instead of concrete EA imports toavoid circular dependencies.
modified.
Closes #5230: ArkoudaExtensionArray arithmetic