On Do, 2015-04-09 at 08:50 +0200, Sebastian Berg wrote: > Hi all, > > Let me take a shot at summing up some suggestions to make the indexing > less surprising, and maybe we can gather some more in a more > concentrated way now. >
Did not want to comment on the first mail > 1. Implement something like `arr.fancy_index[...]` and > `arr.ortho_index[...]` (i.e. Jaimes PR is the start for trying this) > I like this, personally. There is not much to be lost and I fully agree with Robert on this. It opens up a lot of possibilities for us and especially also others. > 2. Add warnings for non-consecutive advanced indexing (i.e. the original > example `arr[0, :, index_array]`). This could be annoying sometimes, but then warnings do not break legacy code, and I think in new code again Robert is right for these cases using arr.fancy_index[...] is more explicit and a nice warning/google help to the confused reader. > > 3. I do not know if it possible or useful, but I could imagine a module > wide switch (similar to __future__ imports) to change the default > indexing behaviour. > OK, my suggestion.... But actually I do not know if I like it all that much (nor if it can be done) since 1. and 2. seem to me like enough. But if someone feels strongly about fancy indexing being bad, I wanted to point out that there may be ways to go down the road to "switch" numpy without actually switching. - Sebastian > > One more thing, implementing this (especially the "new" indexing) is > non-trivial, so as always help beyond just a discussion is appreciated > and in my opinion the best way to push an actual change to happen sooner > rather then in some far off future. I do not have time for concentrating > much on an implementation for a while myself for a while at least. > > - Sebastian > _______________________________________________ > NumPy-Discussion mailing list > [email protected] > http://mail.scipy.org/mailman/listinfo/numpy-discussion
signature.asc
Description: This is a digitally signed message part
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
