From 21ef537c9d56a9b7f6017ea673d0b31d77ef7c8f Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 24 Jun 2024 20:07:35 +0100 Subject: [PATCH 1/2] Fix doc build warnings --- src/zarr/v2/context.py | 4 ++-- src/zarr/v2/indexing.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zarr/v2/context.py b/src/zarr/v2/context.py index 3dd7dda4ac..4eb1db7491 100644 --- a/src/zarr/v2/context.py +++ b/src/zarr/v2/context.py @@ -9,8 +9,8 @@ class Context(TypedDict, total=False): All keys are optional. Any component reading the context must provide a default implementation in the case a key cannot be found. - Items - ----- + Attributes + ---------- meta_array : array-like, optional An array-like instance to use for determining the preferred output array type. diff --git a/src/zarr/v2/indexing.py b/src/zarr/v2/indexing.py index 242e9ae849..bb2d9f1adb 100644 --- a/src/zarr/v2/indexing.py +++ b/src/zarr/v2/indexing.py @@ -989,7 +989,7 @@ class PartialChunkIterator: arr_shape : shape of chunk to select data from Attributes - ----------- + ---------- arr_shape selection From c613be0172356331bc61599e3e12121e217a3fbd Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 24 Jun 2024 20:09:58 +0100 Subject: [PATCH 2/2] Fix mypy error --- src/zarr/indexing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zarr/indexing.py b/src/zarr/indexing.py index 74cbbe8c6b..bb5ed660cf 100644 --- a/src/zarr/indexing.py +++ b/src/zarr/indexing.py @@ -1022,9 +1022,9 @@ def __init__(self, selection: CoordinateSelection, shape: ChunkCoords, chunk_gri # flatten selection selection_broadcast = tuple(dim_sel.reshape(-1) for dim_sel in selection_broadcast) - chunks_multi_index_broadcast = [ - dim_chunks.reshape(-1) for dim_chunks in chunks_multi_index_broadcast - ] + chunks_multi_index_broadcast = tuple( + [dim_chunks.reshape(-1) for dim_chunks in chunks_multi_index_broadcast] + ) # ravel chunk indices chunks_raveled_indices = np.ravel_multi_index(