[Numpy-discussion] matrix indexing question (final post)
Stefan van der Walt
stefan at sun.ac.za
Wed Mar 28 19:49:54 EDT 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