-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Add lazy copy to replace #50746
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
value_getitem(val_locs), BlockPlacement(blk.mgr_locs[blk_locs]) | ||
) | ||
if self.refs is not None: | ||
self.refs.extend([self.refs[blkno_l]] * len(nbs_tup)) |
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.
Do we need to clear the refs at self.refs[blkno_l]
now, since first_nb should not have a reference block?
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.
Thx for catching, must have removed the line accidentially
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.
Adjusted one of the tests to cover this
([0], np.array([-1, -2, -3], dtype=np.intp)), | ||
([1], np.array([-1, -2, -3], dtype=np.intp)), | ||
([5], np.array([-1, -2, -3], dtype=np.intp)), | ||
([0, 1], np.array([-1, -2, -3], dtype=np.intp)), |
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.
cc @lithomas1 I don't think that this is valid or can be reached in this way. I think the dimension of your values has to be the same as your indexer. This raises if blk.should_store_value is False, because it does not get broadcast.
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.
You're right. Even for the non CoW, the iset operation doesn't fail(strangely), but printing the DataFrame afterwards does.
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.
Yep you get a block that has dimension 2 according to block placement but the underlying array has only one column, doesn’t really error when creating but as soon as you access it youll get into trouble :)
Co-authored-by: Thomas Li <[email protected]>
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.
thanks @phofl. |
Thx to you as well, you did most of the work :) |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.cc @lithomas1 as discussed on slack