-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Allow setting of write_empty_chunks
for zarr.core.Array
objects
#1478
Comments
cc: @jni |
Thanks @RKuttruff, I have felt this problem acutely. One fundamental challenge for As a stopgap, we should make these dynamic options correspond to set-able properties of arrays, so users can modify the arrays after getting them from the group. I find this really distasteful, but it should work. |
I see there being two options for making this work given the current API. First, lean into using the state of the Array via setters: array = group['my_array']
array.write_empty_chunks = False
array[:] = ... Second, utilize some sort of scoped config: with zarr.config.set(write_empty_chunks=False):
array = group['my_array']
array[:] = ... Neither are perfect but I think I would lean toward the latter option if I had to. |
We're sorting this out for 3.0 over in #2409. I'm going to close this in favor of the more recent ticket. |
When opening a Zarr group via
zarr.hierarchy.open_group()
there is currently no way to specifywrite_empty_chunks=False
, this can be problematic when appending to existing zarr groups with sparse data as found in pydata/xarray#8009 / pydata/xarray#8016. A simple solution to this would be settingwrite_empty_chunks=False
forArray
objects as they are retrieved from the group. Or, perhaps, allowing the user to specify their preference forwrite_empty_chunks
forArray
s in the group when opening/getting the individualArray
s from the group.The text was updated successfully, but these errors were encountered: