[Numpy-discussion] Uncomfortable with matrix change

Gael Varoquaux gael.varoquaux at normalesup.org
Sun May 11 12:42:01 EDT 2008


On Sun, May 11, 2008 at 12:26:49PM -0400, Alan G Isaac wrote:
> As Anne pointed out, examples are accumulating that there is 
> a *fundamental* problem with matrix handling of scalar 
> indexing.  I agree with this.  It is not just an 
> "annoyance".  It keeps affecting code that tries to handle 
> both matrices and arrays in a generic way.

I don't care, personally. This is a problem. I agree with you. Breaking
existing code is a major disturbance. It as to be weighted with the
gains. The solution of adding another bug elsewhere to plug this problem
is not good to me. This is why I favor the proposal #1 on your list of
propsal http://www.scipy.org/MatrixIndexing , because it introduces the
minimal amount of changes to the interfaces.

> Your phrasing suggests that the only solution is to live 
> with this forever, always cobbling new workarounds, unless 
> backward compatability can be ensured for more sensible 
> behavior, which it pretty clearly cannot.  Is that your 
> current stance?

No, but I am pretty close to this.

> I suspect part of the problem is that "backward 
> compatability" is being interpreted in terms of discoverable 
> behavior, rather than in terms of documented behavior.

Not at all. It is to be interpreted in terms of "I have a few dozens kilolines 
of code left by a student who work with numpy 1.0, if I upgrade numpy,
will they still work?". I do realize the limits of freezing the behavior
of software: bugware. I am not for a complete freeze, I am for a very
well-thought move forward, that introduces a minimum of breakage.

Gaël



More information about the NumPy-Discussion mailing list