You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
API to open only an Array or only a Group from an exisiting Group #3445
It would be nice to have some API to open only an {Array or Group} from an open Group, and raise an error if the {Array or Group} isn't present, or is a {Group or Array}. Current options are:
# No way to know if return type is array or groupgroup['path']
# Creates a array/group if one doesn't existgroup.require_array('path')
group.require_group('path')
So maybe Group.open_array(...) -> Array and Group.open_group(...) methods could be added? These could also have a mode argument, to allow for creating the array if it doesn't exist, similar to zarr.open_array() and zarr.open_group(), which would allow require_array() and require_group() to be deprecated.
So maybe Group.open_array(...) -> Array and Group.open_group(...) methods could be added?
this makes sense to me! While the initial design would probably need to use the problematic mode parameter, later on we should distinguish between "mutable access to an array / group" vs "create a new array / group if one does not already exist" (and the latter is refined by whether overwriting an existing node is allowed)
Activity
d-v-b commentedon Sep 9, 2025
this makes sense to me! While the initial design would probably need to use the problematic
modeparameter, later on we should distinguish between "mutable access to an array / group" vs "create a new array / group if one does not already exist" (and the latter is refined by whether overwriting an existing node is allowed)d-v-b commentedon Oct 27, 2026
this was added in #4128