[Numpy-discussion] Non-meta indexing improvements discussion
Jaime Fernández del Río
jaime.frio at gmail.com
Fri Apr 10 14:27:14 EDT 2015
On Wed, Apr 8, 2015 at 11:50 PM, Sebastian Berg <sebastian at sipsolutions.net>
> 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.
> 1. Implement something like `arr.fancy_index[...]` and
> `arr.ortho_index[...]` (i.e. Jaimes PR is the start for trying this)
> 2. Add warnings for non-consecutive advanced indexing (i.e. the original
> example `arr[0, :, index_array]`).
> 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.
> 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.
I don't think that should be the biggest hurdle if we decided to go for it.
I'm pretty sure that, with some adult supervision, I could pull that one
off. And you don't always get a chance to put your hands on code as cool as
numpy's indexing! ;-)
But before we go down that route, I think we should spend a non-trivial
amount of effort on figuring out exactly what we want. While the proposal
that has started to emerge from this discussion, with the two indexers,
sort of makes sense, we may very well be doing this <https://xkcd.com/927/>
To paraphrase General Ripper
<https://www.youtube.com/watch?v=N1KvgtEnABY&t=31s>, I have neither the
time, the training, nor the inclination for strategic thought. But we
should probably write this into a NEP, and share it with the involved
parties (netcdf, xay, pandas, Blaze, dynd...) and try to come to some
agreement. We are already late for SciPy15, but perhaps a talk on the
proposal would be in order for EuroSciPy, or for one of the PyData
conferences, to try and gather some feedback from potential users.
Without that, this isn't going anywhere...
( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes
de dominación mundial.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion