Is there a way to step through an array with arbitrary strides that I could
use here for the key array? We could at least stop copying read only
arrays, as @njsmith noted NPY_ARRAY_DEFAULT checks for weight only arrays.
I could include that in this pull request.
On Mar 1, 2013 5:38 PM, "Charles Harris" <notifications@github.com> wrote:

> In numpy/core/src/multiarray/item_selection.c:
>
> > @@ -1505,15 +1505,22 @@
> >      char *parr = PyArray_DATA(arr);
> >      char *pkey = PyArray_DATA(key);
> >      npy_intp *pret = (npy_intp *)PyArray_DATA(ret);
> > -    int elsize = PyArray_DESCR(arr)->elsize;
> > +    int elsize = PyArray_DESCR(key)->elsize;
>
> Heh, and I usually have big arrays of keys and small arrays to look them
> up in. But in general I agree that the lookup times will dominate the key
> retrieval time.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/numpy/numpy/pull/3107/files#r3213822>
> .
>