Skip to content

Commit d9d51aa

Browse files
committed
Remove an inconsistent rule about indexing
The rule said that empty slices should work, but the note right below that says that they are optional.
1 parent 4edf370 commit d9d51aa

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

spec/API_specification/indexing.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ Slice syntax must have the following defaults. Let `n` be the axis (dimension) s
105105
- If `k` is greater than `0` and `j` is not provided (e.g., `0::2`), `j` must equal `n`.
106106
- If `k` is less than `0` and `i` is not provided (e.g., `:10:-2`), `i` must equal `n-1`.
107107
- If `k` is less than `0` and `j` is not provided (e.g., `0::-2`), `j` must equal `-n-1`.
108-
109-
Using a slice to index a single array axis must adhere to the following rules. Let `n` be the axis (dimension) size.
110-
111-
- If `i` equals `j`, a slice must return an empty array, whose axis (dimension) size along the indexed axis is `0`.
112-
113108
- Indexing via `:` and `::` must be equivalent and have defaults derived from the rules above. Both `:` and `::` indicate to select all elements along a single axis (dimension).
114109

115110
```{note}
@@ -184,4 +179,4 @@ The result of an indexing operation (e.g., multi-axis indexing, boolean array in
184179
```{note}
185180
186181
The specified return value behavior includes indexing operations which return a single value (e.g., accessing a single element within a one-dimensional array).
187-
```
182+
```

0 commit comments

Comments
 (0)