-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REF: _try_cast; go through fastpath more often #41597
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
jbrockmendel
commented
May 20, 2021
- closes Series construction: _try_cast typo, function often taking slow route? #28145
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
can you post benchmark results |
if is_object_dtype(dtype) and not isinstance(arr, np.ndarray): | ||
subarr = construct_1d_object_array_from_listlike(arr) | ||
return subarr | ||
elif is_object_dtype(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.
could do this check upfront and assign to a variable (as do this at the top)
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. might as well optimize to the gills
with
|