[Numpy-discussion] matrix indexing question (final post)

Stefan van der Walt stefan@sun.ac...
Wed Mar 28 18:49:54 CDT 2007


On Wed, Mar 28, 2007 at 07:05:00PM -0500, Alan Isaac wrote:
> On Wed, 28 Mar 2007, Stefan van der Walt wrote: 
> > Matrices strike me as a bit of an anomaly. I would expect 
> > an N-dimensional container to contain (N-1)-dimensional 
> > objects. 
> 
> Yes indeed.

Doesn't seem to be the way the matrix world works though:

octave:2> x = zeros(3,3,5);
octave:3> size(x)
ans =

  3  3  5

octave:4> size(x(:,:,1))
ans =

  3  3

octave:5> size(x(:,1,1))
ans =

  3  1

Cheers
Stéfan


More information about the Numpy-discussion mailing list