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

Stephan Hoyer shoyer at gmail.com
Fri Apr 3 20:01:50 EDT 2015

On Fri, Apr 3, 2015 at 4:54 PM, Nathaniel Smith <njs at pobox.com> wrote:

> Unfortunately, AFAICT this means our only options here are to have
> some kind of backcompat break in numpy, some kind of backcompat break
> in pandas, or to do nothing and continue indefinitely with the status
> quo where the same indexing operation might silently return different
> results depending on the types passed in.

For what it's worth, DataFrame.__getitem__ is also pretty broken in pandas
(even worse than in NumPy). Not even the pandas devs can keep straight how
it works!

So we'll probably need a backwards incompatible switch there at some point,

That said, the issues are somewhat different, and in my experience the
strict label and integer based indexers .loc and .iloc work pretty well. I
haven't heard any complaints about how they do cartesian indexing rather
than fancy indexing.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150403/b97764bf/attachment.html>

More information about the NumPy-Discussion mailing list