@@ -3484,7 +3484,7 @@ async def create_array(
34843484 chunks : ChunkCoords | Literal ["auto" ] = "auto" ,
34853485 shards : ChunkCoords | Literal ["auto" ] | None = None ,
34863486 filters : FiltersParam = "auto" ,
3487- compression : CompressionParam = "auto" ,
3487+ compressors : CompressionParam = "auto" ,
34883488 fill_value : Any | None = 0 ,
34893489 order : MemoryOrder | None = "C" ,
34903490 zarr_format : ZarrFormat | None = 3 ,
@@ -3514,9 +3514,19 @@ async def create_array(
35143514 shards : ChunkCoords, optional
35153515 Shard shape of the array. The default value of ``None`` results in no sharding at all.
35163516 filters : Iterable[Codec], optional
3517- List of filters to apply to the array.
3518- compression : Iterable[Codec], optional
3519- List of compressors to apply to the array.
3517+ Iterable of filters to apply to each chunk of the array, in order, before serializing that
3518+ chunk to bytes.
3519+ For Zarr v3, a "filter" is a transformation that takes an array and returns an array,
3520+ and these values must be instances of ``ArrayArrayCodec``, or dict representations
3521+ of ``ArrayArrayCodec``.
3522+ For Zarr v2, a "filter" can be any numcodecs codec; you should ensure that the
3523+ the order if your filters is consistent with the behavior of each filter.
3524+ compressors : Iterable[Codec], optional
3525+ List of compressors to apply to the array. Compressors are applied in order, and after any
3526+ filters are applied (if any are specified).
3527+ For Zarr v3, a "compressor" is a transformation that takes a string of bytes and
3528+ returns another string of bytes.
3529+ For Zarr v2, a "compressor" can be any numcodecs codec.
35203530 fill_value : Any, optional
35213531 Fill value for the array.
35223532 order : {"C", "F"}, optional
@@ -3579,7 +3589,7 @@ async def create_array(
35793589 )
35803590 filters = cast (Iterable [numcodecs .abc .Codec ] | Literal ["auto" ], filters )
35813591 filters_parsed , compressor_parsed = _parse_chunk_encoding_v2 (
3582- compression = compression , filters = filters , dtype = dtype_parsed
3592+ compression = compressors , filters = filters , dtype = dtype_parsed
35833593 )
35843594 if dimension_names is not None :
35853595 raise ValueError ("Zarr v2 arrays do not support dimension names." )
@@ -3604,7 +3614,7 @@ async def create_array(
36043614 )
36053615 else :
36063616 array_array , array_bytes , bytes_bytes = _parse_chunk_encoding_v3 (
3607- compression = compression , filters = filters , dtype = dtype_parsed
3617+ compression = compressors , filters = filters , dtype = dtype_parsed
36083618 )
36093619 sub_codecs = (* array_array , array_bytes , * bytes_bytes )
36103620 codecs_out : tuple [Codec , ...]
0 commit comments