[Numpy-discussion] Re: Advanced indexing doesn't follow the Principle of least astonishment

2022-12-29 Thread Robert Kern
On Thu, Dec 29, 2022 at 8:50 AM Diogo Valada wrote: > Hi all, > > New to the mailing list, so I hope I'm creating a discussion in the right > place. > > Am I the only one that thinks that Advanced indexing in numpy doesn't > follow the principle of minimum astonishment? > > for example > > ```pyt

[Numpy-discussion] Advanced indexing doesn't follow the Principle of least astonishment

2022-12-29 Thread Diogo Valada
Hi all, New to the mailing list, so I hope I'm creating a discussion in the right place. Am I the only one that thinks that Advanced indexing in numpy doesn't follow the principle of minimum astonishment? for example ```python a = np.random.rand(100, 100) a[(2,4)] #this yields the element at