[Numpy-discussion] untenable matrix behavior in SVN

Gael Varoquaux gael.varoquaux@normalesup....
Sat Apr 26 05:03:04 CDT 2008


On Fri, Apr 25, 2008 at 01:04:53PM -0400, Alan G Isaac wrote:
> On Fri, 25 Apr 2008, Stéfan van der Walt apparently wrote:
> > The agreement was:
> > a) That x[0][0] should be equal to x[0,0] and 
> > b) That x[0,:] should be equal to x[0] (as for ndarrays)

> 1. This is **not** what I understood as the agreement
> (and I think the current solution is bad).
> I certainly did not mean to support the change that
> as implemented, and it is not clear to me that others
> did either.

> 2. These two goals are substantially in conflict for 
> matrices, as we are seeing.

> 3. The important goal, (goal a., which everyone agrees on),
> has NOT been accomplished by the current change:
> x[0][0] raises a TypeError when x is a 1 by N matrix.

I claim b is more important than a. IMHO, a is plain wrong: you should't
be indexing x with x[0][0]. I am OK making a work, as long as it doesn't
break b. In addition breaking be is backward incompatible changes for no
good reason (replacing one missfeature with another).

I would like this issue addressed in next release, not this one. I have
the feeling the discussion is not sane enough, right now.

Cheers,

Gaël


More information about the Numpy-discussion mailing list