Commit 38a2478
authored
Clarify that boolean array indexing requirements (#164)
We only require that boolean array indexing be supported when the array is the
sole index. The previous text was ambiguous, and could be read as supporting
boolean arrays plus other non-array indices as part of a larger
multidimensional index. However, this is complicated in general, as it can
lead to some corner cases. See the discussion in #84.
With that being said, it is still an open discussion whether we should allow
some subset of boolean array indices along with other non-array indices in the
same index. I believe regardless, what we do not want to allow is:
- multiple boolean arrays (this requires broadcasting semantics, which are
confusing for boolean arrays)
- boolean arrays and integers separated by a non-integer index (for example
a[b, :, 0] where b is a boolean array). This is the corner case currently
implemented by NumPy which we want to avoid for the standard.1 parent a679857 commit 38a2478
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
0 commit comments