-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
WARN: Remove false positive warning for iloc inplaceness #48397
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
Changes from 11 commits
8f7432b
9ac855b
2c3920c
8fc58f3
ab1080c
1aa0448
40427c4
7240895
a1a824c
03bc147
44e910d
0d2c2c4
7f04bdc
c4b0780
49da3ce
7e4e5e8
805ec5d
7762cda
ead315a
8a772c7
b4714ce
a6de70e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2016,6 +2016,10 @@ def _setitem_single_column(self, loc: int, value, plane_indexer): | |
and ( | ||
np.shares_memory(new_values, orig_values) | ||
or new_values.shape != orig_values.shape | ||
or ( | ||
not can_hold_element(orig_values, np.nan) | ||
and isna(new_values).any() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how do we get here with warn=True? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, so i think what's happening here is that we are checking can_hold_element too soon, bc reindexing occurs within There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pushed a suggestion. Not sure what is better performance wise. Checking initially and the rechecking? Is This breaks one test, not sure if you can set an all NaT Series into an underlying Series with timezone There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. _get_column_array is pretty cheap. its the isna(...).any() that i think may be expensive There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
depends on the dtype of the all-NaT Series There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. original values are There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that should definitely not be inplace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great, we fixed the test instead of breaking it :) Anything against checking only new_values then? See latest commit now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think that makes sense. caffeine is still kicking in though |
||
) | ||
) | ||
): | ||
# TODO: get something like tm.shares_memory working? | ||
|
Uh oh!
There was an error while loading. Please reload this page.