[Numpy-discussion] Uncomfortable with matrix change
Charles R Harris
Fri May 9 09:06:15 CDT 2008
On Fri, May 9, 2008 at 8:00 AM, Charles R Harris <firstname.lastname@example.org>
> On Fri, May 9, 2008 at 7:43 AM, Travis Oliphant <email@example.com>
>> Hi all,
>> I'm having trouble emailing this list from work, so I'm using a
>> different email address.
>> After Nathan Bell's recent complaints, I'm a bit more uncomfortable with
>> the matrix change to scalar indexing. It does and will break code in
>> possibly hard-to-track down ways. Also, Nathan has been a *huge*
>> contributor to the Sparse matrix in scipy and so I value his opinion
>> about the NumPy matrix. One of my goals is to have those two objects
>> work together a bit more seamlessly.
>> So, I think we need to:
>> 1) Add a warning to scalar access
>> 2) Back-out the change and fix all the places where NumPy assumes
>> incorrectly that the number of dimensions reduce on PySequence_GetItem.
> That said, the basic mistake is probably making Matrix a subclass of
> ndarray, as it fails the "is a" test. There really aren't that many places
> where inheritance is the right choice and numpy itself wasn't designed as a
> base class: it lacks a specification of what functions can be "virtual" and
> is probably too big.
> I vote that we bring Nathan into the conversation and see how upset he
> really is. Speaking for myself, I sometimes get angry upfront when
> specifications change unexpectedly underfoot but then settle down and find
> that it isn't all that bad. Being caught by surprise is probably half the
Let me add that backing it out of 1.1 might not be a bad idea, it may be a
change to soon and at the last minute at that. But I would like to see it in
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion