[Numpy-discussion] matrix indexing question

Alan G Isaac aisaac@american....
Mon Mar 26 15:18:04 CDT 2007

>> On Mon, 26 Mar 2007, "Colin J. Williams" apparently wrote: 
>>> One would expect the iteration over A to return row 
>>> vectors, represented by (1, n) matrices. 

> On 3/26/07, Alan G Isaac <aisaac@american.edu> wrote: 
>> This is again simple assertion. 
>> **Why** would "one" expect this? 
>> Some people clearly do not. 

On Mon, 26 Mar 2007, Charles R Harris apparently wrote: 
> Well, and what should they expect.

Since matrices are an iterable Python object,
we *expect* to iterate over the contained objects.
(Arrays.)  I am not sure why this is not evident to all,
but it is surely the sticking point in this discussion.

A matrix is not a container of matrices.
That it acts like one is surprsing.
Surprises are bad unless they have a clear justification.
Perhaps a clear justification exists,
but it has not been offered in this discussion.

Alan Isaac

More information about the Numpy-discussion mailing list