On Fri, Apr 25, 2008 at 2:57 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote:
> On Fri, 25 Apr 2008, Christopher Barker apparently wrote: > > I think a Vector object would allow both of: > > M[i,j] == M[i][j] > > and > > M[i] == M[i,:] > > The problem is that it would be a crime to give up > the natural production of submatrices. The NATURAL RULE > is: to get a submatrix, use nonscalar indices. > We should *not* give up that x[0,:] is a sub*matrix* > whose first element is x[0,0] and equivalently x[0][0]. > *This* is why we must have x[0]!=x[0,:] if we want, > as we do, that x[0][0]==x[0,0]. > I would give it up and let x(0) be a submatrix, the normal indexing is then exactly like an array. True, the result of x(0) can't be used as an lvalue (only getitem equivalence), but otherwise it should work fine. Chuck
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion