[Numpy-discussion] Getting an item in an array with its coordinates given by another array

Matthieu Brucher matthieu.brucher@gmail....
Mon Oct 29 12:21:07 CDT 2007

> What do you mean by "item" in an array?  Usually, when I refer to an
> "item" in the array, I'm talking about getting a particular element of
> the array.

In fact, I have a multi-dimensional array, and the last dimension is the
vector I want to get (I needed it for tests for my dense deformation field I
asked about on the scipy user list). So it's not a particular element, it's
a group of elements.

It would appear that you are trying to get a "sub-array" or "sub-space"
> of the array because you are using partial indexing.

Yes, that's what I really want to do in this case.

Let me know if there is more clarification needed.   The relevant code
> is in the function fancy_indexing_check in arrayobject.c of the source
> code.

Thank you, I have my explanation, but perhaps a totuple() method could be
added so that a double conversion is not needed anymore when an array is
used for indexing ?

French PhD student
Website : http://miles.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20071029/bfdd2261/attachment.html 

More information about the Numpy-discussion mailing list