[Numpy-discussion] NEP 21: Simplified and explicit advanced indexing

Hameer Abbasi 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
exactly that?

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’)

Best Regards,
Hameer Abbasi
Sent from Astro <https://www.helloastro.com> for Mac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180626/833b16c5/attachment-0001.html>

More information about the NumPy-Discussion mailing list