-
-
Notifications
You must be signed in to change notification settings - Fork 18.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
Copy on Write via weakrefs #11207
Copy on Write via weakrefs #11207
Conversation
u need to have tests doesn't matter if it's a demo or not these are the first things u should write to demonstrate the API |
@jreback ok, added! |
5114f81
to
70ddd85
Compare
Added an example of forward protection. NOT generalizable or at all robust, just illustrative for one setting. |
This might work in a reasonably efficient way if you make |
@shoyer would you mind explaining a little more? You mean just a floating global dictionary as opposed to an object attribute? Main problem I'm having now (love suggestions @jreback @shoyer ): where to place |
The problem with making |
oh, oh, I see. Great! |
this list of |
I'm still a fan of using WeakValuesDictionary rather than rolling our own On Fri, Oct 2, 2015 at 2:52 PM, Jeff Reback notifications@github.com
|
well if you get it to work, all ears. if you do
you don't have a ref, so not really sure what you are trying to track |
That's the one case we wanted to stay as a view (full column slices) right?
|
Also: I don't yet understand the internals well enough to know where all I
|
c4e514a
to
9a4a6c4
Compare
Moving to new thread: |
Aims to eventually close #10954 , alternative to #10973
In the interest of advancing the discussion on this, here's a skeleton of a different copy on write implementation.
Currently
When setting on a view, converts to copy.
Chained-indexing will ALWAYS fail.
SettingWithCopy
warning disabled, thought not fully removed (figure this is too early stage to really chase that down).Forward Protection for
loc
setting (proof of concept, added oct 2):Goals / Places I'd love help
_is_column_view
that can be set toTrue
when a slice is a full column (e.g.new = df['col1']
, but I'm not sure how to actually figure out if a slice is a full column, so right now it's initialized asFalse
and just stays that way._children
list attribute to keep references to their childviews
.views
tocopies
.But as it stand, I don't know how to really manage those references (i.e. how to put references to children in that
_children
list).@jreback
@shoyer
@JanSchulz
@TomAugspurger