-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: de-duplicate numeric type check in _libs/testing #36625
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
pandas/_libs/testing.pyx
Outdated
|
||
cdef bint is_comparable_as_number(obj): | ||
return isinstance(obj, NUMERIC_TYPES) | ||
cdef bint is_comparable_as_real_number(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.
is wouldn't even do this, just use the imported one directly.
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.
not a huge deal, but unless we expect to use it elsewhere, id rather this new func live here rather than in util; otherwise it gets re-compiled into basically every cython module.
looks good, still some lint issues, ping on green (small comment) |
Green |
@arw2019 can you merge master |
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.
can merge on green
Sorry to have been quiet! Merged again just now - all green |
thanks @arw2019 |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
In
testing.pyx
we keep a list of numeric dtypes and use that for type checking. But we have functions that do this intslibs/util.pxd
so it's better to use those instead