`zarr.zeros` (and possibly other convenience functions) doesn't allow specifying shards; it would be nice if this was possible. ```python import zarr zarr.zeros(shape=(10,), chunks=(2,), shards=(4,)) ``` ```python Traceback (most recent call last): File "/Users/dstansby/software/zarr/zarr-python/test.py", line 3, in <module> zarr.zeros(shape=(10,), chunks=(2,), shards=(4,)) File "/Users/dstansby/software/zarr/zarr-python/src/zarr/api/synchronous.py", line 1441, in zeros return Array(sync(async_api.zeros(shape=shape, **kwargs))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dstansby/software/zarr/zarr-python/src/zarr/core/sync.py", line 159, in sync raise return_result File "/Users/dstansby/software/zarr/zarr-python/src/zarr/core/sync.py", line 119, in _runner return await coro ^^^^^^^^^^ File "/Users/dstansby/software/zarr/zarr-python/src/zarr/api/asynchronous.py", line 1353, in zeros return await create(shape=shape, fill_value=0, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dstansby/software/zarr/zarr-python/src/zarr/api/asynchronous.py", line 1087, in create return await AsyncArray._create( ^^^^^^^^^^^^^^^^^^^ TypeError: AsyncArray._create() got an unexpected keyword argument 'shards' ```
Activity
d-v-b commentedon Nov 6, 2025
looks like these methods need to target
create_arrayinstead ofcreate