You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide/arrays.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,12 +163,19 @@ We currently support three configuration options for arrays: `write_empty_chunks
163
163
| field | type | default | description |
164
164
| - | - | - | - |
165
165
| `write_empty_chunks` | `bool` | `False` | Controls whether empty chunks are written to storage. See [Empty chunks](performance.md#empty-chunks).
166
-
| `fill_missing_chunks` | `bool` | `True` | Controls whether missing chunks are filled with the array's fill value on read. If `False`, reading missing chunks raises a `MissingChunkError`.
166
+
| `fill_missing_chunks` | `bool` | `True` | Controls whether missing chunks are filled with the array's fill value on read. If `False`, reading missing chunks raises a [`ChunkNotFoundError`][].
167
167
| `order` | `Literal["C", "F"]` | `"C"` | The memory layout of arrays returned when reading data from the store.
168
168
169
+
!!! info
170
+
The Zarr V3 spec states that readers should interpret an uninitialized chunk as containing the
171
+
array's `fill_value`. By default, Zarr-Python follows this behavior: a missing chunk is treated
172
+
as uninitialized and filled with the array's `fill_value`. However, if you know that all chunks
173
+
have been written (i.e., are initialized), you may want to treat a missing chunk as an error. Set
174
+
`fill_missing_chunks=False` to raise a [`ChunkNotFoundError`][] instead.
175
+
169
176
!!! note
170
177
`write_empty_chunks=False` skips writing chunks that are entirely the array's fill value.
171
-
If `fill_missing_chunks=False`, attempting to read these missing chunks will raise an error.
178
+
If `fill_missing_chunks=False`, attempting to read these missing chunks will raise a [`ChunkNotFoundError`][].
172
179
173
180
You can specify the configuration when you create an array with the `config` keyword argument.
174
181
`config` can be passed as either a `dict` or an `ArrayConfig` object.
Copy file name to clipboardExpand all lines: docs/user-guide/config.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Configuration options include the following:
30
30
- Default Zarr format `default_zarr_version`
31
31
- Default array order in memory `array.order`
32
32
- Whether empty chunks are written to storage `array.write_empty_chunks`
33
-
- Whether missing chunks are filled with the array's fill value on read `array.fill_missing_chunks` (default `True`). Set to `False` to raise a `MissingChunkError` instead.
33
+
- Whether missing chunks are filled with the array's fill value on read `array.fill_missing_chunks` (default `True`). Set to `False` to raise a [`ChunkNotFoundError`][] instead.
34
34
- Async and threading options, e.g. `async.concurrency` and `threading.max_workers`
35
35
- Selections of implementations of codecs, codec pipelines and buffers
36
36
- Enabling GPU support with `zarr.config.enable_gpu()`. See GPU support for more.
0 commit comments