Hi, I'm not sure what's the best place to ask zarr questions so I'm posting this here.
I'm trying to iterate as fast as possible over a zarr.Array with very few chunks initialized.
I couldn't find a method for this so I'm implementing my own function that will return a sequence of chunks and their respective slices.
I started with this function to get the chunks' key:
def get_initialized_keys(array: Array):
# key pattern for chunk keys
prog = re.compile(r'\.'.join([r'\d+'] * min(1, array.ndim)))
# yield chunk keys
for k in listdir(array.chunk_store, array._path):
if prog.match(k):
yield k
Is there any API to get the reverse BasicIndexer behavior, so for a given key (chunk_selection) I would get its slice (out_selection)?
Thanks
Hi, I'm not sure what's the best place to ask
zarrquestions so I'm posting this here.I'm trying to iterate as fast as possible over a
zarr.Arraywith very few chunks initialized.I couldn't find a method for this so I'm implementing my own function that will return a sequence of chunks and their respective slices.
I started with this function to get the chunks' key:
Is there any API to get the reverse
BasicIndexerbehavior, so for a givenkey(chunk_selection) I would get its slice (out_selection)?Thanks