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

2018-06-25 Thread Robert Kern
On Mon, Jun 25, 2018 at 11:29 PM Andrew Nelson wrote: > On Tue, 26 Jun 2018 at 16:24, Juan Nunez-Iglesias > wrote: > >> > Plain indexing arr[...] should return an error for ambiguous cases. >> [...] This includes every use of vectorized indexing with multiple integer >> arrays. >> >> This line c

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

2018-06-25 Thread Andrew Nelson
On Tue, 26 Jun 2018 at 16:24, Juan Nunez-Iglesias wrote: > > Plain indexing arr[...] should return an error for ambiguous cases. > [...] This includes every use of vectorized indexing with multiple integer > arrays. > > This line concerns me. In scikit-image, we often do: > > rr, cc = coords.T #

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

2018-06-25 Thread Juan Nunez-Iglesias
> Plain indexing arr[...] should return an error for ambiguous cases. > [...] This includes every use of vectorized indexing with multiple > integer arrays. This line concerns me. In scikit-image, we often do: rr, cc = coords.T # coords is an (n, 2) array of integer coordinates values = image[rr,

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

2018-06-25 Thread Eric Wieser
Generally +1 on this, but I don’t think we need To ensure that existing subclasses of ndarray that override indexing do not inadvertently revert to default behavior for indexing attributes, these attribute should have explicit checks that disable them if __getitem__ or __setitem__ has been overrid

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

2018-06-25 Thread Stephan Hoyer
Sebastian and I have revised a Numpy Enhancement Proposal that he started three years ago for overhauling NumPy's advanced indexing. We'd now like to present it for official consideration. Minor inline comments (e.g., typos) can be added to the latest pull request (https://github.com/numpy/numpy/p