[Numpy-discussion] On responding to dubious ideas (was: Re: Advanced indexing: "fancy" vs. orthogonal)
josef.pktd at gmail.com
josef.pktd at gmail.com
Thu Apr 9 12:12:54 EDT 2015
On Thu, Apr 9, 2015 at 10:11 AM, Alan G Isaac <alan.isaac at gmail.com> wrote:
> > Alan wrote:
>>> 3. I admit, my students are NOT using non-boolen fancy indexing on
>>> >multidimensional arrays. (As far as I know.) Are yours?
The only confusing case is mixing slices and integer array indexing
for ndim > 2. The rest looks unsurprising, AFAIR
(AFAICS, my last fancy indexing mailing list discussion is at least 4
years old, with Jonathan Taylor. I don't remember when I discovered
the usefulness of the axis argument in take which covers many 3 or
higher dimensional indexing use cases.)
>
>
> On 4/9/2015 2:22 AM, Nathaniel Smith wrote:
>> Well, okay, this would explain it, since integer fancy indexing is
>> exactly the confusing case:-) On the plus side, this also means that
>> even if pigs started doing barrel-rolls through hell's
>> winter-vortex-chilled air tomorrow and we simply removed integer fancy
>> indexing, your students would be unaffected:-)
>
>
> Except that they do use statsmodels, which I believe (?) does make use of
> integer fancy-indexing.
And maybe all work would come to a standstill, because every library
is using fancy integer indexing.
I still don't know what all constitutes fancy indexing.
The two most common use cases for me (statsmodels) are indexing for
selecting elements like diag_indices, triu_indices and maybe nonzero,
and expanding from a unique array like inverse index in np.unique.
And there are just a few, AFAIR, orthogonal indexing cases with
broadcasting index arrays to select rectangular pieces of an array.
Josef
>
> Alan
>
> _______________________________________________
> 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