On Thu, Apr 2, 2015 at 11:03 AM, Eric Firing <efir...@hawaii.edu> wrote:

> Fancy indexing is a horrible design mistake--a case of cleverness run
> amok.  As you can read in the Numpy documentation, it is hard to
> explain, hard to understand, hard to remember.


Well put!

I also failed to correct predict your example.


> So I think you should turn the question around and ask, "What is the
> actual real-world use case for fancy indexing?"  How often does real
> code rely on it?


I'll just note that Indexing with a boolean array with the same shape as
the array (e.g., x[x < 0] when x has greater than 1 dimension) technically
falls outside a strict interpretation of orthogonal indexing. But there's
not any ambiguity in adding that as an extension to orthogonal indexing
(which otherwise does not allow ndim > 1), so I think your point still
stands.

Stephan
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to