-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
It's possible to construct a v2 ArraySpec with quite a short call:
ArraySpec(shape=(50, 50), chunks=(32, 32), dtype=np.uint16),To create the same ArraySpec in v3 requires a much longer call:
ArraySpec(
shape=(50, 50),
data_type=np.uint16,
chunk_grid=NamedConfig(
name="regular",
configuration={"chunk_shape": [32, 32]},
),
chunk_key_encoding=NamedConfig(
name="default", configuration={"separator": "/"}
),
fill_value=0,
codecs=[NamedConfig(name="bytes")],
),It would be nice to shorten this call somehow. Options could include giving some of the parameters default, or providing some helper function to make constructing ArraySpecs easier.
My suggestions would be:
- Add a
regular_chunk_config(shape: tuple[int, ...]) -> NamedConfighelper function - Make codecs default to
[NamedConfig(name="bytes")] - Possibly make chunk_key_encoding default to the config for "/"
Metadata
Metadata
Assignees
Labels
No labels