Skip to content

Commit 879d36b

Browse files
authored
Update src/zarr/core/array.py
1 parent 15f9e3f commit 879d36b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/zarr/core/array.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,12 @@ class DefaultFillValue:
152152
"""
153153
Sentinel class to indicate that the default fill value should be used.
154154
155-
This class is used to distinguish between:
156-
Zarr Format 3:
157-
- fill_value = None: dtype default value
158-
Zarr Format 2:
159-
- fill_value = None: fill_value saved as null
160-
161-
This allows backwards compatibility with zarr format 2.
155+
This class exists because the normal values used to convey "defaultness"
156+
like ``None`` or ``"auto"` do not work for the fill value parameter of a Zarr array.
157+
``None`` is a valid fill value for Zarr V2 (resulting in ``"fill_value: null"`` in array metadata).
158+
A string like ``"auto"`` is a valid fill value for an array with a string data type.
159+
But an instance of this class lies outside the space of valid fill values, which makes it
160+
suitable for expressing that the default fill value should be used.
162161
"""
163162

164163

0 commit comments

Comments
 (0)