[Numpy-discussion] Advanced indexing: "fancy" vs. orthogonal

josef.pktd at gmail.com josef.pktd at gmail.com
Thu Apr 2 21:09:09 EDT 2015

On Thu, Apr 2, 2015 at 8:02 PM, Eric Firing <efiring at hawaii.edu> wrote:
> On 2015/04/02 1:14 PM, Hanno Klemm wrote:
>> 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.
> Are you *positive* that there is no clever way to make a transition?
> It's not worth any further thought?

I guess it would be similar to python 3 string versus bytes, but
without the overwhelming benefits.

I don't think I would be in favor of deprecating fancy indexing even
if it were possible. In general, my impression is that if there is a
trade-off in numpy between powerful machinery versus easy to learn and
teach, then the design philosophy when in favor of power.

I think numpy indexing is not too difficult and follows a consistent
pattern, and I completely avoid mixing slices and index arrays with
ndim > 2.

I think it should be DOA, except as a discussion topic for numpy 3000.

just my opinion


>> 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.
> I'm not advocating adding even more complexity, I'm trying to think
> about ways to make it *less* complex from the typical user's standpoint.
> Eric
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion

More information about the NumPy-Discussion mailing list