[Numpy-discussion] Getting an item in an array with its coordinates given by another array
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
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...
More information about the Numpy-discussion