-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REF/TYP: indexes #40330
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
REF/TYP: indexes #40330
Conversation
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 ping on green
except (KeyError, TypeError, ValueError): | ||
return False | ||
return bool( | ||
is_scalar(res) or isinstance(res, slice) or (is_list_like(res) and len(res)) |
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.
this is some crazy condition, good to remove it
what kind of gains here? |
hmm, the azure checks are not running. odd |
on the benchmark ive been using, _reset_identity is about 2.4% of the runtime, which this cuts to 1% |
thanks @jbrockmendel |
The only non-trivial change here is changing
_id
from_id = _Identity(object)
to_id = object()
, which I found in profiling (#40171 (comment)) makes a non-trivial difference as the non-cython performance inches closer to the cython performance.Share DTI/TDI/PI's _simple_new with Categorical.
Simplify DTI/TDI
__contains__
Annotations.
Docstring follow-up to #40241