this looks good, i'm going to approve + merge. there's a remaining bugged case that I will fix in a follow-up PR:
import numpy as np, zarr
from zarr.storage import MemoryStore
from zarr.codecs import ShardingCodec, BytesCodec
a = zarr.create_array(
MemoryStore(), shape=(4, 4, 4), chunks=(2, 4, 4), dtype="int32",
serializer=ShardingCodec(chunk_shape=(2, 2, 2), codecs=(BytesCodec(),)),
compressors=None, fill_value=0,
)
a[:] = np.arange(64, dtype="int32").reshape(4, 4, 4)
a.oindex[np.array([3, 1, 2]), 1, np.array([0, 2])] = np.arange(6, dtype="int32").reshape(3, 2)
# ValueError: shape mismatch: value array of shape (1,2) could not be broadcast to indexing result of shape (1,)
Originally posted by @d-v-b in #4284 (comment)
this looks good, i'm going to approve + merge. there's a remaining bugged case that I will fix in a follow-up PR:
Originally posted by @d-v-b in #4284 (comment)