[Numpy-discussion] matrix indexing question

Alan G Isaac aisaac@american....
Mon Mar 26 08:54:26 CDT 2007

> Alan G Isaac schrieb: 
>> What feels wrong: iterating over a container does not give 
>> access to the contained objects.  This is not Pythonic. 

On Mon, 26 Mar 2007, Sven Schreiber apparently wrote: 
> If you iterate over the rows of the matrix, it feels 
> natural to me to get the row vectors

Natural in what way?
Again, I am raising the question of what
would be expected from someone familiar with Python.
Abstractly, what do you expect to get when you iterate
over a container?  Seriously.

> But I admit I'm a 2d fan so much so that I didn't even 
> know that using a single index is possible with a matrix.

Exactly.  When you want submatrices, you expect to index for 
them.  EXACTLY!!

Alan Isaac

More information about the Numpy-discussion mailing list