-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
REF: Share NumericArray/NumericDtype methods #45997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -41,6 +44,22 @@ | |||
|
|||
class NumericDtype(BaseMaskedDtype): | |||
_default_np_dtype: np.dtype | |||
_checker: Callable[[Any], bool] # is_foo_dtype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be more partial to _dtype_checker
, but won't die on that hill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. OK for follow-up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup sounds good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off-topic question: I am interested in exploring the feasibility of adding an Arrow-back NumericArray. It doesn't appear that I can just subclass this since NumericArray and it's subclass are heavily numpy based.
Any recommendations on where to start? Would I need to essentially create MaskedArrowArray
and go from there?
I've been thinking we should refactor as much of ArrowStringArray as possible out into a general arrow-backed EA. Not sure if that could be a fully-formed EA or if it would need to be a mixin. (also in the tests there's an ArrowExtensionArray but I think its half-baked) FWIW my current thought with MaskedArray is to try to get as much of NumericArray and BooleanArray pushed down into MaskedArray as possible so it can just become a wrapper around an arbitrary non-masked array (including e.g. other EAs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the gameplan. LGTM.
luv it |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.