Skip to content
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

should groups be allowed to self-annihilate #2826

Open
d-v-b opened this issue Feb 13, 2025 · 0 comments
Open

should groups be allowed to self-annihilate #2826

d-v-b opened this issue Feb 13, 2025 · 0 comments

Comments

@d-v-b
Copy link
Contributor

d-v-b commented Feb 13, 2025

See this example:

>>> from zarr import create_group
>>> create_group({})
<Group memory://126474867787584>
>>> g = create_group({})
>>> g.store._store_dict
{'zarr.json': <zarr.core.buffer.cpu.Buffer object at 0x73073576ef50>}
>>> del g['']        
>>> g.store._store_dict 
{}

There are two issues here -- first, should this be allowed at all? I think not, which means we need to make some changes to how groups resolve node names. Second, how should we handle situations where an in-memory group or array is backed by an invalid or stale stored representation? Would anyone find value in a function that checks whether an array or group is consistent with its stored representation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant