-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
PERF: improve conversion to BooleanArray from int/float array #29838
Comments
take |
take |
@ethanywang hi, you can't take the issue because it's assigned (to me :)). I had some technical difficulties last week, which stopped me from working on it, but I should submit a PR shortly. If you have a specific reason to want to take it or want to discuss, feel free to comment |
@leonicus Hi Leonicus, sorry about taking this issue without asking you first, but we have submitted the PR and get a response from the maintainer... We saw you claimed it a week ago without doing anything, so we thought you were facing some difficulties to work on it. Actually, for now, we are doing this issue as a course project, and it is quite difficult for us to change the chosen issue as we have already submitted it to our professor... So sorry about that... |
@ethanywang that's OK, just please notice that the "take" keyword doesn't really work on assigned issues (as you can see, it is still assigned to me as well). So next time just write to the issue assignee to check |
Currently, the creation of a BooleanArray from an int/float array goes through a conversion to object dtype (to do it together with the generic conversion from any list-like):
pandas/pandas/core/arrays/boolean.py
Lines 133 to 145 in 7d7f885
For the specific case of int/float ndarray, this could be optimized with a specific path for those cases without the casting to object array (probably just skipping the
np.asarray(values, dtype=object)
ifvalues
is a float/int ndarray will be enough).The text was updated successfully, but these errors were encountered: