Skip to content

Commit f267ebd

Browse files
authored
Fix a typo in the indexing specification (#292)
The slice start bounds were off-by-one, preventing slices that should be valid to produce an empty slice.
1 parent f9f9bc4 commit f267ebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/API_specification/indexing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ This specification does not require "clipping" out-of-bounds slice indices. This
117117
The following ranges for the start and stop values of a slice must be supported. Let `n` be the axis (dimension) size being sliced. For a slice `i:j:k`, the behavior specified above should be implemented for the following:
118118

119119
- `i` or `j` omitted (`None`).
120-
- `-n <= i <= max(0, n - 1)`.
120+
- `-n <= i <= n`.
121121
- For `k > 0` or `k` omitted (`None`), `-n <= j <= n`.
122122
- For `k < 0`, `-n - 1 <= j <= max(0, n - 1)`.
123123

0 commit comments

Comments
 (0)