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

Travis E. Oliphant oliphant@enthought....
Mon Oct 29 13:20:48 CDT 2007


>
> 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 ?
In this case the constructor

tuple(arr)

should work just fine. 

The tolist() method is really more useful for converting a 
multi-dimensional array to a list of lists (instead of a list of N-1 
dimensional arrays).


-Travis




More information about the Numpy-discussion mailing list