[Numpy-discussion] NEP 21: Simplified and explicit advanced indexing
einstein.edison at gmail.com
Tue Jun 26 04:23:23 EDT 2018
> Boolean indices are not supported. All indices must be integers, integer
arrays or slices.
I would hope that there’s at least some way to do boolean indexing. I often
find myself needing it. I realise that
`arr.vindex[np.nonzero(boolean_idx)]` works, but it is slightly too verbose
for my liking. Maybe we can have `arr.bindex[boolean_index]` as an alias to
Or is boolean indexing preserved as-is n the newest proposal? If so, great!
Another thing I’d say is `arr.?index` should be replaced with `arr.?idx`. I
personally prefer `arr.?x` for my fingers but I realise that for someone
not super into NumPy indexing, this is kind of opaque to read, so I propose
this less verbose but hopefully equally clear version, for my (and others’)
Sent from Astro <https://www.helloastro.com> for Mac
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion