On Mon, Jun 25, 2018 at 11:29 PM Andrew Nelson <andyf...@gmail.com> wrote:

> On Tue, 26 Jun 2018 at 16:24, Juan Nunez-Iglesias <jni.s...@gmail.com>
> wrote:
>
>> > Plain indexing arr[...] should return an error for ambiguous cases.
>> [...] This includes every use of vectorized indexing with multiple integer
>> arrays.
>>
>> This line concerns me. In scikit-image, we often do:
>>
>> rr, cc = coords.T  # coords is an (n, 2) array of integer coordinates
>> values = image[rr, cc]
>>
>> Are you saying that this use is deprecated? Because we love it at
>> scikit-image. I would be very very very sad to lose this syntax.
>>
>
>  I second Juan's sentiments wholeheartedly here.
>

And thirded. This should not be considered deprecated or discouraged. As I
mentioned in the previous iteration of this discussion, this is the
behavior I want more often than the orthogonal indexing. It's a really
common way to work with images and other kinds of raster data, so I don't
think it should be relegated to the "officially discouraged" ghetto of
`.legacy_index`. It should not issue warnings or (eventual) errors. I would
reserve warnings for the cases where the current behavior is something no
one really wants, like mixing slices and integer arrays.

-- 
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to