[Numpy-discussion] Uncomfortable with matrix change
Sat May 10 15:05:38 CDT 2008
2008/5/10 Jarrod Millman <email@example.com>:
> On Sat, May 10, 2008 at 8:14 AM, Keith Goodman <firstname.lastname@example.org> wrote:
>>> If these are backed out, will some kind of deprecation
>>> warning be added for scalar indexing, as Travis suggested?
>>> Robert's request seems in accord with this.
>> Shouldn't a deprecation warning explain what the future behavior will
>> be? Is there a firm consensus on what that behavior will be?
> I agree that a deprecation warning needs to explain the future
> behavior and don't believe we have agreed on what it should be yet.
> I don't personally have an opinion on the what the new behavior should
> be at this point. But I don't think it makes sense to add deprecation
> warnings at this point--unless we know exactly what it is that we will
> be doing in the future. So while it could be argued that it would be
> useful to say "use x[0,:] instead of x to return row 0 as a matrix"
> in the 1.1 release, my sense is that we will still need to replace
> that DeprecationWarning in 1.2 with a new DeprecationWarning saying
> something like "in 1.3 x will return .... and if you want .... you
> will need to call x[0,:]". I don't think we should have two different
> DeprecationWarnings in back to back releases and believe that we
> should wait to include the warning until we decide what the new
> behavior will be in 1.2.
Regrettably I have to agree that we can't introduce a
DeprecationWarning until 1.2. I don't agree that x[0,:] should return
a matrix! It should be the one-dimensional object it looks like. See
Keith Goodman's recent message -
- for an example of why representing 1D objects as 2D objects is
trouble. I am of the opinion that matrix indexing should be identical
to array indexing, insofar as that is possible.
I don't expect my opinion to prevail, but the point is that we do not
even have enough consensus to agree on a recommendation to go in the
More information about the Numpy-discussion