8000 Fix minor indexing errors in tutorial and specification examples of d… · Swordcat/zarr-python@13f7d0d · GitHub
[go: up one dir, main page]

Skip to content

Commit 13f7d0d

Browse files
authored
Fix minor indexing errors in tutorial and specification examples of documentation (zarr-developers#1277)
1 parent 1af77b6 commit 13f7d0d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/spec/v1.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ are converted to strings and concatenated with the period character
144144
('.') separating each index. For example, given an array with shape
145145
(10000, 10000) and chunk shape (1000, 1000) there will be 100 chunks
146146
laid out in a 10 by 10 grid. The chunk with indices (0, 0) provides
147-
data for rows 0-1000 and columns 0-1000 and is stored under the key
148-
'0.0'; the chunk with indices (2, 4) provides data for rows 2000-3000
149-
and columns 4000-5000 and is stored under the key '2.4'; etc.
147+
data for rows 0-999 and columns 0-999 and is stored under the key
148+
'0.0'; the chunk with indices (2, 4) provides data for rows 2000-2999
149+
and columns 4000-4999 and is stored under the key '2.4'; etc.
150150

151151
There is no need for all chunks to be present within an array
152152
store. If a chunk is not present then it is considered to be in an

docs/spec/v2.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ To form a string key for a chunk, the indices are converted to strings and
216216
concatenated with the period character (".") separating each index. For
217217
example, given an array with shape (10000, 10000) and chunk shape (1000, 1000)
218218
there will be 100 chunks laid out in a 10 by 10 grid. The chunk with indices
219-
(0, 0) provides data for rows 0-1000 and columns 0-1000 and is stored under the
220-
key "0.0"; the chunk with indices (2, 4) provides data for rows 2000-3000 and
221-
columns 4000-5000 and is stored under the key "2.4"; etc.
219+
(0, 0) provides data for rows 0-999 and columns 0-999 and is stored under the
220+
key "0.0"; the chunk with indices (2, 4) provides data for rows 2000-2999 and
221+
columns 4000-4999 and is stored under the key "2.4"; etc.
222222

223223
There is no need for all chunks to be present within an array store. If a chunk
224224
is not present then it is considered to be in an uninitialized state. An

docs/tutorial.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,9 @@ When the indexing arrays have different shapes, they are broadcast together.
525525
That is, the following two calls are equivalent::
526526

527527
>>> z[1, [1, 3]]
528-
array([5, 7])
528+
array([6, 8])
529529
>>> z[[1, 1], [1, 3]]
530-
array([5, 7])
530+
array([6, 8])
531531

532532
Indexing with a mask array
533533
~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)
0