Re: [Numpy-discussion] Allow __getitem__ to support custom objects

2020-10-30 Thread Aaron Meurer
On Fri, Oct 30, 2020 at 9:18 AM Sebastian Berg wrote: > > On Thu, 2020-10-29 at 23:58 -0600, Aaron Meurer wrote: > > On Thu, Oct 29, 2020 at 6:09 PM Sebastian Berg > > wrote: > > > On Tue, 2020-10-27 at 17:15 -0600, Aaron Meurer wrote: > > > > For ndindex (https://quansight.github.io/ndindex/), t

Re: [Numpy-discussion] Allow __getitem__ to support custom objects

2020-10-30 Thread Sebastian Berg
On Thu, 2020-10-29 at 23:58 -0600, Aaron Meurer wrote: > On Thu, Oct 29, 2020 at 6:09 PM Sebastian Berg > wrote: > > On Tue, 2020-10-27 at 17:15 -0600, Aaron Meurer wrote: > > > For ndindex (https://quansight.github.io/ndindex/), the biggest > > > issue > > > with the API is that to use an ndindex

Re: [Numpy-discussion] Allow __getitem__ to support custom objects

2020-10-29 Thread Aaron Meurer
On Thu, Oct 29, 2020 at 6:09 PM Sebastian Berg wrote: > > On Tue, 2020-10-27 at 17:15 -0600, Aaron Meurer wrote: > > For ndindex (https://quansight.github.io/ndindex/), the biggest issue > > with the API is that to use an ndindex object to actually index an > > array, you have to use a[idx.raw] in

Re: [Numpy-discussion] Allow __getitem__ to support custom objects

2020-10-29 Thread Sebastian Berg
On Tue, 2020-10-27 at 17:15 -0600, Aaron Meurer wrote: > For ndindex (https://quansight.github.io/ndindex/), the biggest issue > with the API is that to use an ndindex object to actually index an > array, you have to use a[idx.raw] instead of a[idx]. This is because > for NumPy arrays, you cannot a

[Numpy-discussion] Allow __getitem__ to support custom objects

2020-10-27 Thread Aaron Meurer
For ndindex (https://quansight.github.io/ndindex/), the biggest issue with the API is that to use an ndindex object to actually index an array, you have to use a[idx.raw] instead of a[idx]. This is because for NumPy arrays, you cannot allow custom objects to be indices. The exception is objects tha