Skip to content

Fix minor indexing errors in tutorial and specification examples of d… #1277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/spec/v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ are converted to strings and concatenated with the period character
('.') separating each index. For example, given an array with shape
(10000, 10000) and chunk shape (1000, 1000) there will be 100 chunks
laid out in a 10 by 10 grid. The chunk with indices (0, 0) provides
data for rows 0-1000 and columns 0-1000 and is stored under the key
'0.0'; the chunk with indices (2, 4) provides data for rows 2000-3000
and columns 4000-5000 and is stored under the key '2.4'; etc.
data for rows 0-999 and columns 0-999 and is stored under the key
'0.0'; the chunk with indices (2, 4) provides data for rows 2000-2999
and columns 4000-4999 and is stored under the key '2.4'; etc.

There is no need for all chunks to be present within an array
store. If a chunk is not present then it is considered to be in an
Expand Down
6 changes: 3 additions & 3 deletions docs/spec/v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ To form a string key for a chunk, the indices are converted to strings and
concatenated with the period character (".") separating each index. For
example, given an array with shape (10000, 10000) and chunk shape (1000, 1000)
there will be 100 chunks laid out in a 10 by 10 grid. The chunk with indices
(0, 0) provides data for rows 0-1000 and columns 0-1000 and is stored under the
key "0.0"; the chunk with indices (2, 4) provides data for rows 2000-3000 and
columns 4000-5000 and is stored under the key "2.4"; etc.
(0, 0) provides data for rows 0-999 and columns 0-999 and is stored under the
key "0.0"; the chunk with indices (2, 4) provides data for rows 2000-2999 and
columns 4000-4999 and is stored under the key "2.4"; etc.

There is no need for all chunks to be present within an array store. If a chunk
is not present then it is considered to be in an uninitialized state. An
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,9 @@ When the indexing arrays have different shapes, they are broadcast together.
That is, the following two calls are equivalent::

>>> z[1, [1, 3]]
array([5, 7])
array([6, 8])
>>> z[[1, 1], [1, 3]]
array([5, 7])
array([6, 8])

Indexing with a mask array
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down