[Numpy-discussion] Advanced indexing: "fancy" vs. orthogonal
klemm at phys.ethz.ch
Thu Apr 2 19:14:21 EDT 2015
> On 03 Apr 2015, at 00:04, Colin J. Williams <cjw at ncf.ca> wrote:
> On 02-Apr-15 4:35 PM, Eric Firing wrote:
>> On 2015/04/02 10:22 AM, josef.pktd at gmail.com wrote:
>>> Swapping the axis when slices are mixed with fancy indexing was a
>>> design mistake, IMO. But not fancy indexing itself.
>> I'm not saying there should be no fancy indexing capability; I am saying
>> that it should be available through a function or method, rather than
>> via the square brackets. Square brackets should do things that people
>> expect them to do--the most common and easy-to-understand style of indexing.
Well, I have written quite a bit of code that relies on fancy indexing, and I think the question, if the behaviour of the  operator should be changed has sailed with numpy now at version 1.9. Given the amount packages that rely on numpy, changing this fundamental behaviour would not be a clever move.
If people want to implement orthogonal indexing with another method, by all means I might use it at some point in the future. However, adding even more complexity to the behaviour of the bracket slicing is probably not a good idea.
More information about the NumPy-Discussion