Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eacd9a9

Browse files
authored
Merge pull request #117 from data-apis/indexing-fix
Fix indexing semantics for a negative slice
2 parents aebcf68 + bbc2c92 commit eacd9a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/API_specification/indexing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Multi-dimensional arrays must extend the concept of single-axis indexing to mult
139139
140140
- Providing a single nonnegative integer `i` as a single-axis index must index the same elements as the slice `i:i+1`.
141141
142-
- Providing a single negative integer `i` as a single-axis index must index the same elements as the slice `n+i:n`, where `n` is the axis (dimension) size.
142+
- Providing a single negative integer `i` as a single-axis index must index the same elements as the slice `n+i:n+i+1`, where `n` is the axis (dimension) size.
143143
144144
- Providing a single integer as a single-axis index must reduce the number of array dimensions by `1` (i.e., the array rank should decrease by one; if `A` has rank `2`, `rank(A)-1 == rank(A[0, :])`). In particular, a selection tuple with the `m`th element an integer (and all other entries `:`) indexes a sub-array with rank `N-1`.
145145

0 commit comments

Comments
 (0)