[Numpy-discussion] matrix indexing question
Charles R Harris
Mon Mar 26 15:31:59 CDT 2007
On 3/26/07, Alan G Isaac <email@example.com> wrote:
> >> 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 <firstname.lastname@example.org> 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.
> Matrices don't contain arrays. Indeed, in linear algebra they are elements
of the tensor product of a vector space with its dual, so one would expect
either row or column vectors depending on the index position.
But this discussion is not really relevant at this point. What happens is a
convention and the numpy convention is out there. It isn't going to change
now, it would break too much code.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion