-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Stop astype from overwriting arrays when copy=True #8679
Conversation
Test failures |
Interesting, the diff looks fine to me: |
You take the simplest-looking failure and run it locally with
pdb.set_trace() to find out.
|
... since I guess it's not easy to find out just by looking at it, as
the changes themselves look innocent.
|
OK thanks for the details, I was asking to see if anyone had some insights off the top off their head just in case. |
The problem is that a "deduped_data" operation is impossible:
deduplication alters also index arrays (previously, it was in-place
which is OK). This helper function probably should be renamed to
something else, since it's misleading now.
|
Hi @pv, I would like to try working towards closing this PR. I took a look at the bug report, and was initially thinking of adding a test to duplicate the behavior and after that work on fixing the build issues. From your comments above, are you implying that the fix to this issue is to name the helper function |
@clementkng If you are interested in investigating this that would be great! A test to reproduce the initial issue would be useful in any case.
Just changing the name of that function is not going to help I imagine. I'm not sure how to avoid the issue mentioned in #8679 (comment). |
Fixes gh-8678 by adding a new kwarg to the private
_deduped_data
method, which preventssum_duplicates
from modifying the source matrix when it shouldn't.