-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
ARROW-3363: [C++/Python] Add helper functions to detect scalar Python types #2659
Conversation
Required for #2623 |
@xhochy clang-format fails |
python/pyarrow/types.pxi
Outdated
@@ -1474,3 +1474,15 @@ def from_numpy_dtype(object dtype): | |||
check_status(NumPyDtypeToArrow(dtype, &c_type)) | |||
|
|||
return pyarrow_wrap_data_type(c_type) | |||
|
|||
|
|||
def is_boolean_object(object obj): |
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.
The naming and/or placement in types module feels a bit odd.
pa.types.is_integer_object(pa.types.int16()) # False
Perhaps is_<type>_value
?
OR
How about creating a pyarrow.inference
module with is_bool
, is_int
, is_float
functions?
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 like the _value name ok
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.
LGTM
Sounds good, to run |
CI failure is related to wheel incompatibilities. |
No description provided.