Skip to content

Commit 7e0ec27

Browse files
committed
docs: use markdown backticks and actual codec defaults
Revert RST-style double backticks to single backticks in the edited docstrings, replace references to the removed array.v3_default_compressors / array.v3_default_serializer config keys with the actual Zarr format 3 defaults, and rename the changelog fragment after the PR number. Assisted-by: ClaudeCode:claude-opus-5-5
1 parent a5f91c4 commit 7e0ec27

4 files changed

Lines changed: 18 additions & 20 deletions

File tree

File renamed without changes.

‎src/zarr/api/asynchronous.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,8 +1020,8 @@ async def create(
10201020
codecs : Sequence of Codecs or dicts, optional
10211021
An iterable of Codec or dict serializations of Codecs. Zarr V3 only.
10221022
1023-
The elements of ``codecs`` specify the transformation from array values to stored bytes.
1024-
Zarr format 3 only. Zarr format 2 arrays should use ``filters`` and ``compressor`` instead.
1023+
The elements of `codecs` specify the transformation from array values to stored bytes.
1024+
Zarr format 3 only. Zarr format 2 arrays should use `filters` and `compressor` instead.
10251025
In order, a Zarr format 3 pipeline contains zero or more
10261026
[`zarr.abc.codec.ArrayArrayCodec`][] filters, exactly one
10271027
[`zarr.abc.codec.ArrayBytesCodec`][] serializer, and zero or more

‎src/zarr/api/synchronous.py‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ def create(
758758
codecs : Sequence of Codecs or dicts, optional
759759
An iterable of Codec or dict serializations of Codecs. Zarr V3 only.
760760
761-
The elements of ``codecs`` specify the transformation from array values to stored bytes.
762-
Zarr format 3 only. Zarr format 2 arrays should use ``filters`` and ``compressor`` instead.
761+
The elements of `codecs` specify the transformation from array values to stored bytes.
762+
Zarr format 3 only. Zarr format 2 arrays should use `filters` and `compressor` instead.
763763
In order, a Zarr format 3 pipeline contains zero or more
764764
[`zarr.abc.codec.ArrayArrayCodec`][] filters, exactly one
765765
[`zarr.abc.codec.ArrayBytesCodec`][] serializer, and zero or more
@@ -900,10 +900,9 @@ def create_array(
900900
[`zarr.abc.codec.BytesBytesCodec`][], or dict representations of
901901
[`zarr.abc.codec.BytesBytesCodec`][]. Multiple compressors may be provided
902902
for Zarr format 3. Codecs that take an array and return bytes are serializers
903-
and must be supplied with ``serializer`` instead.
904-
If no ``compressors`` are provided, a default set of compressors will be used.
905-
These defaults can be changed by modifying the value of ``array.v3_default_compressors``
906-
in [`zarr.config`][zarr.config].
903+
and must be supplied with `serializer` instead.
904+
If no `compressors` are provided, the default for Zarr format 3 is
905+
`(ZstdCodec(),)`.
907906
Use `None` to omit default compressors.
908907
909908
For Zarr format 2, a "compressor" can be any numcodecs codec. Only a single compressor may
@@ -915,10 +914,10 @@ def create_array(
915914
Array-to-bytes codec to use for encoding the array data.
916915
Zarr format 3 only. Zarr format 2 arrays use implicit array-to-bytes conversion.
917916
Codecs that are instances of [`zarr.abc.codec.ArrayBytesCodec`][] must be
918-
supplied here, not with ``compressors``.
919-
If no ``serializer`` is provided, a default serializer will be used.
920-
These defaults can be changed by modifying the value of ``array.v3_default_serializer``
921-
in [`zarr.config`][zarr.config].
917+
supplied here, not with `compressors`.
918+
If no `serializer` is provided, a default serializer is chosen based on the data type:
919+
`VLenUTF8Codec` for variable-length strings, `VLenBytesCodec` for variable-length
920+
bytes, and `BytesCodec` otherwise.
922921
fill_value : Any, optional
923922
Fill value for the array.
924923
order : {"C", "F"}, optional

‎src/zarr/core/array.py‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4647,10 +4647,9 @@ async def create_array(
46474647
[`zarr.abc.codec.BytesBytesCodec`][], or dict representations of
46484648
[`zarr.abc.codec.BytesBytesCodec`][]. Multiple compressors may be provided
46494649
for Zarr format 3. Codecs that take an array and return bytes are serializers
4650-
and must be supplied with ``serializer`` instead.
4651-
If no ``compressors`` are provided, a default set of compressors will be used.
4652-
These defaults can be changed by modifying the value of ``array.v3_default_compressors``
4653-
in [`zarr.config`][zarr.config].
4650+
and must be supplied with `serializer` instead.
4651+
If no `compressors` are provided, the default for Zarr format 3 is
4652+
`(ZstdCodec(),)`.
46544653
Use `None` to omit default compressors.
46554654
46564655
For Zarr format 2, a "compressor" can be any numcodecs codec. Only a single compressor may
@@ -4662,10 +4661,10 @@ async def create_array(
46624661
Array-to-bytes codec to use for encoding the array data.
46634662
Zarr format 3 only. Zarr format 2 arrays use implicit array-to-bytes conversion.
46644663
Codecs that are instances of [`zarr.abc.codec.ArrayBytesCodec`][] must be
4665-
supplied here, not with ``compressors``.
4666-
If no ``serializer`` is provided, a default serializer will be used.
4667-
These defaults can be changed by modifying the value of ``array.v3_default_serializer``
4668-
in [`zarr.config`][zarr.config].
4664+
supplied here, not with `compressors`.
4665+
If no `serializer` is provided, a default serializer is chosen based on the data type:
4666+
`VLenUTF8Codec` for variable-length strings, `VLenBytesCodec` for variable-length
4667+
bytes, and `BytesCodec` otherwise.
46694668
fill_value : Any, optional
46704669
Fill value for the array.
46714670
order : {"C", "F"}, optional

0 commit comments

Comments
 (0)